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
66 lines (59 loc) · 1.36 KB
/
elements.js
File metadata and controls
66 lines (59 loc) · 1.36 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import styled, { css } from 'styled-components';
export const Container = styled.div`
display: flex;
background-color: ${props =>
props.theme['editor.background'] || props.theme.background()};
padding: 0.5rem;
align-items: center;
line-height: 1;
/* box-shadow: 0 1px 3px #ddd; */
height: 35px;
min-height: 35px;
box-sizing: border-box;
z-index: 2;
`;
export const Icons = styled.div`
display: flex;
`;
export const Icon = styled.button`
display: inline-block;
border: none;
background-color: transparent;
color: ${props =>
props.disabled
? props.theme.light
? 'rgba(0, 0, 0, 0.3)'
: 'rgba(255, 255, 255, 0.3)'
: props.theme.light
? 'rgba(0, 0, 0, 0.5)'
: 'rgba(255, 255, 255, 0.6)'};
font-size: 1.5rem;
line-height: 0.5;
margin: 0 0.1rem;
vertical-align: middle;
text-align: center;
padding: 0;
outline: none;
${props =>
!props.disabled &&
`
&:hover {
cursor: pointer;
color: ${
props.theme.light ? 'rgba(0, 0, 0, 1)' : 'rgba(255, 255, 255, 1)'
};
}`};
${props =>
props.selected &&
css`
color: ${props.theme.templateColor || props.theme.secondary};
`};
`;
export const AddressBarContainer = styled.div`
width: 100%;
box-sizing: border-box;
margin: 0 0.5rem;
`;
export const SwitchContainer = styled.div`
flex: 0 0 3.5rem;
`;