-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.ts
43 lines (37 loc) · 1.15 KB
/
styles.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import styled from 'styled-components';
import { LeftArrow } from "../svgs/LeftArrow";
import { RightArrow } from "../svgs/RightArrow";
export const CarouselContainer = styled.div<{customWidth?: string}>`
position: relative;
width: ${({customWidth}) => customWidth ? customWidth : '100%'};
margin: 0 4rem;
`;
export const CarouselOverflow = styled.div`
position: inherit;
overflow: hidden;
`;
export const CarouselWrapper = styled.div`
display: flex;
width: auto;
transition: transform 0.3s ease-in-out;
`;
export const CarouselItem = styled.div`
flex: 0 0 auto;
margin-right: 1rem;
`;
export const StyledLeftArrow = styled(LeftArrow)<{ disabled: boolean }>`
position: absolute;
top: 50%;
left: -3rem;
transform: translateY(-50%);
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
`;
export const StyledRightArrow = styled(RightArrow)<{ disabled: boolean }>`
position: absolute;
top: 50%;
right: -3rem;
transform: translateY(-50%);
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
`;