-
Notifications
You must be signed in to change notification settings - Fork 67
/
Timeline.styled.ts
124 lines (103 loc) 路 3.09 KB
/
Timeline.styled.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import {Group} from '@visx/group';
import styled, {css} from 'styled-components';
import {
SemanticGroupNames,
SemanticGroupNamesToColor,
SemanticGroupNamesToLightColor,
} from 'constants/SemanticGroupNames.constants';
export const Container = styled.div<{$showMatched: boolean}>`
height: 100%;
padding: 24px;
padding-left: 50px;
position: relative;
${({$showMatched}) =>
$showMatched &&
css`
.node-span-list > g:not(.matched) {
opacity: 0.5;
}
`}
`;
export const CircleArrow = styled.circle`
fill: transparent;
`;
export const CircleCheck = styled.circle<{$passed: boolean}>`
fill: ${({$passed, theme}) => ($passed ? theme.color.success : theme.color.error)};
`;
export const CircleNumber = styled.circle`
fill: ${({theme}) => theme.color.borderLight};
`;
export const RectOutput = styled.rect`
fill: ${({theme}) => theme.color.warningYellow};
height: 12px;
width: 12px;
`;
export const GroupCollapse = styled(Group)`
cursor: pointer;
`;
export const Image = styled.image<{$width?: number; $height?: number}>`
height: ${({$height}) => $height ?? 8}px;
width: ${({$width}) => $width ?? 8}px;
`;
export const LineConnector = styled.line`
stroke: ${({theme}) => theme.color.textLight};
`;
export const PathArrow = styled.path`
fill: ${({theme}) => theme.color.textLight};
transform: scale(0.6);
`;
export const RectBadge = styled.rect<{$type: SemanticGroupNames}>`
fill: ${({$type}) => SemanticGroupNamesToLightColor[$type]};
height: 12px;
width: 50px;
pointer-events: none;
`;
export const RectDuration = styled.rect<{$type: SemanticGroupNames}>`
fill: ${({$type}) => SemanticGroupNamesToColor[$type]};
height: 6px;
pointer-events: none;
`;
export const RectDurationGuideline = styled.rect`
fill: ${({theme}) => theme.color.borderLight};
height: 1px;
pointer-events: none;
width: 100%;
`;
export const RectOverlay = styled.rect<{$isMatched: boolean; $isSelected: boolean}>`
cursor: pointer;
fill: ${({$isSelected, theme}) => ($isSelected ? theme.color.backgroundInteractive : 'transparent')};
stroke: ${({$isMatched, theme}) => $isMatched && theme.color.text};
stroke: ${({$isSelected, theme}) => $isSelected && theme.color.interactive};
width: 100%;
:hover {
fill: ${({theme}) => theme.color.backgroundInteractive};
}
`;
export const TextBadge = styled.text`
fill: ${({theme}) => theme.color.text};
font-size: 8px;
pointer-events: none;
text-transform: uppercase;
`;
export const TextDescription = styled.text`
fill: ${({theme}) => theme.color.text};
font-size: ${({theme}) => theme.size.xs};
pointer-events: none;
`;
export const TextName = styled.text`
fill: ${({theme}) => theme.color.text};
font-size: ${({theme}) => theme.size.sm};
font-weight: 600;
pointer-events: none;
`;
export const TextNumber = styled.text`
fill: ${({theme}) => theme.color.textLight};
font-size: ${({theme}) => theme.size.sm};
pointer-events: none;
`;
export const TextOutput = styled.text`
fill: ${({theme}) => theme.color.white};
font-size: ${({theme}) => theme.size.xs};
font-weight: bold;
pointer-events: none;
`;