-
-
Notifications
You must be signed in to change notification settings - Fork 201
/
timeline-control.styles.ts
90 lines (79 loc) 路 2.02 KB
/
timeline-control.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import styled from 'styled-components';
import { Theme } from '../../../models/Theme';
import { TimelineMode } from '../../../models/TimelineModel';
export const TimelineNavWrapper = styled.ul<{ theme?: Theme }>`
background: rgba(229, 229, 229, 0.85);
border-radius: 25px;
display: flex;
list-style: none;
padding: 0.25em 0.25em;
`;
export const TimelineNavItem = styled.li<{ disable?: boolean }>`
padding: 0.1em;
display: flex;
align-items: center;
justify-content: center;
${(p) => (p.disable ? 'pointer-events: none; filter: opacity(0.7)' : '')};
`;
export const TimelineNavButton = styled.button<{
mode?: TimelineMode;
rotate?: 'TRUE' | 'FALSE';
theme?: Theme;
}>`
align-items: center;
background: ${(p) => p.theme.primary};
border-radius: 50%;
border: 0;
color: #fff;
cursor: pointer;
display: flex;
filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.25));
height: 20px;
justify-content: center;
margin: 0 0.2em;
padding: 0;
transition: all 0.1s ease-in;
width: 20px;
transform: ${(p) => {
if (p.rotate === 'TRUE') {
return `rotate(90deg)`;
}
}};
&:active {
filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.25));
transform: ${(p) => (p.rotate === 'TRUE' ? 'rotate(90deg)' : '')} scale(0.9);
}
svg {
width: 80%;
height: 80%;
}
`;
export const TimelineControlContainer = styled.div<{
flip?: boolean;
slideShowActive?: boolean;
}>`
align-items: center;
display: flex;
justify-content: center;
// direction: ${(p) => (p.flip ? 'rtl' : 'ltr')};
visibility: ${(p) => (p.slideShowActive ? 'hidden' : 'visible')};
`;
export const ControlButton = styled.button<{ theme?: Theme }>`
align-items: center;
background: ${(p) => p.theme.primary};
border-radius: 50%;
cursor: pointer;
display: flex;
height: 2em;
justify-content: center;
margin-left: 0.5em;
width: 2em;
outline: 0;
color: #fff;
svg {
width: 80%;
height: 80%;
}
`;
export const MediaToggle = styled(ControlButton)``;
export const ReplayWrapper = styled(ControlButton)``;