forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.ts
More file actions
76 lines (68 loc) · 1.52 KB
/
elements.ts
File metadata and controls
76 lines (68 loc) · 1.52 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
67
68
69
70
71
72
73
74
75
76
import styled, { css } from 'styled-components';
import { Overlay } from '../SandboxCard/elements';
export const Border = styled.div<{ color?: string }>`
${({ color = `none` }) => css`
position: relative;
top: -4px;
width: 100%;
height: 4px;
background: ${color};
`}
`;
export const TemplateTitle = styled.span`
display: block;
width: 100%;
margin: 6px 12px;
font-family: Poppins, Roboto, sans-serif;
font-size: 12px;
font-weight: 500;
text-align: left;
`;
export const TemplateSubTitle = styled.span`
${({ theme }) => css`
display: block;
width: 100%;
height: 16px;
padding: 0 12px;
margin-bottom: 6px;
color: ${theme.placeholder};
font-size: 12px;
text-align: left;
line-height: 16px;
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
`}
`;
export const MyTemplate = styled.button<{ overlayHeight?: number }>`
${({ theme, overlayHeight }) => css`
position: relative;
width: 203.5px;
min-width: 203.5px;
padding: 0;
border: 2px solid ${theme.background5};
border-radius: 4px;
background: ${theme.background2};
color: ${theme.lightText};
cursor: pointer;
box-sizing: border-box;
overflow: hidden;
&:focus {
border: 2px solid ${theme.secondary};
outline: none;
}
img {
display: block;
max-width: 100%;
}
${Overlay} {
height: ${overlayHeight}px;
text-align: left;
}
&:hover {
${Overlay} {
opacity: 1;
}
}
`}
`;