forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.tsx
More file actions
45 lines (42 loc) · 1 KB
/
elements.tsx
File metadata and controls
45 lines (42 loc) · 1 KB
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
import styled from '../../styled-components'
import { Colors } from 'overmind-themes'
export const Path = styled<
{
visible?: boolean
},
'div'
>('div')`
position: relative;
min-width: 25px;
visibility: ${({ visible }) => (visible === false ? 'hidden' : 'visible')};
`
export const PathLine = styled<
{
borderColor?: keyof Colors
},
'div'
>('div')`
position: absolute;
top: 50%;
left: 0;
z-index: 0;
width: 100%;
border-bottom: 1px solid
${({ theme, borderColor }) =>
borderColor ? theme.color[borderColor] : theme.color.black};
`
export const PathText = styled<
{
borderColor?: keyof Colors
},
'div'
>('div')`
position: relative;
z-index: 1;
margin: ${({ theme }) => `0 ${theme.padding.smaller} 0 25px`};
padding: ${({ theme }) =>
`${theme.padding.smallest} ${theme.padding.smaller}`};
border: 1px solid ${({ theme, borderColor }) => theme.color[borderColor]};
background-color: #fff;
border-radius: ${({ theme }) => theme.borderRadius.normal};
`