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
49 lines (44 loc) · 1.13 KB
/
elements.ts
File metadata and controls
49 lines (44 loc) · 1.13 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
import styled, { css } from 'styled-components';
import { Button as BaseButton } from 'reakit/Button';
import { withoutProps } from '../../utils';
export const Navigation = styled.nav.attrs({
role: 'navigation',
'aria-label': 'Pagination Navigation',
})``;
export const Controls = styled.ul`
display: flex;
list-style: none;
margin: 0;
padding: 0;
`;
export const Button = styled(withoutProps(`active`)(BaseButton))<{
active: boolean;
}>`
${({ active }) => css`
display: inline-flex;
justify-content: center;
align-items: center;
width: 34px;
height: 22px;
padding: 0;
margin: 0 2px;
border: none;
background: ${active ? css`#40A9F3` : css`none`};
border-radius: 4px;
color: ${active ? css`#fff` : css`#b8b9ba`};
font-family: Roboto;
font-style: normal;
font-weight: bold;
font-size: 14px;
cursor: pointer;
&:disabled {
color: ${active ? css`#fff` : css`#666`};
cursor: default;
}
&:hover:not(:disabled),
&:focus:not(:disabled) {
color: #fff;
background: ${active ? css`#40A9F3` : css`rgba(108, 174, 221, 0.2);`};
}
`}
`;