forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.js
More file actions
40 lines (36 loc) · 889 Bytes
/
elements.js
File metadata and controls
40 lines (36 loc) · 889 Bytes
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
import styled from 'styled-components';
import css from '@styled-system/css';
export const FileContainer = styled.div(props =>
css(theme => ({
display: 'flex',
alignItems: 'center',
fontSize: 3,
lineHeight: '24px',
paddingLeft: theme.space[3] * (props.depth + 1),
backgroundColor: props.isSelected ? 'sideBar.border' : 'transparent',
':hover': {
cursor: 'pointer',
backgroundColor: 'sideBar.border',
},
}))
);
export const IconContainer = styled.span(
css({
display: 'inline-flex',
width: 16,
height: 16,
justifyContent: 'center',
alignItems: 'center',
// thanks I hate it
// had to add !important to because EntryIcon which has
// all the icons has inline styles :(
'> div': {
display: 'flex !important',
},
})
);
export const FileName = styled.span(
css({
marginLeft: 1,
})
);