-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts-table.style.js
67 lines (54 loc) · 1.41 KB
/
posts-table.style.js
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
import styled, { css } from 'styled-components';
import Container from '../common/container';
const GridTemplate = css`
display: grid;
grid-template-columns: 6fr minmax(auto, 2fr) minmax(auto, 1fr) minmax(auto, 2fr) minmax(auto, 2fr);
`;
const EllipseText = css`
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
`;
const BorderRight = css`
border-right-width: 1px;
border-right-style: solid;
border-right-color: ${({ theme }) => theme.color.table.border};
&:last-of-type {
border-right: none;
}
`;
export const PostsTableWrapper = styled(Container)`
margin-bottom: 2.5em; /* 40px */
margin-top: 2.5em; /* 40px */
`;
export const PostsTable = styled.div.attrs({
'aria-label': 'posts table',
})`
border-width: 1px;
border-style: solid;
border-color: ${({ theme }) => theme.color.table.border};
color: ${({ theme }) => theme.color.table.text};
font-size: ${({ theme }) => theme.font.size.sm};
`;
export const PostsTableHeadings = styled.div`
${GridTemplate}
& > div {
padding: 0.625em; /* 10px */
${BorderRight}
${EllipseText}
}
`;
export const PostsTableHeading = styled.div`
font-weight: 600;
`;
export const PostsTableRow = styled.div`
border-top-width: 1px;
border-top-style: solid;
border-top-color: ${({ theme }) => theme.color.table.border};
${GridTemplate}
& > div {
padding: 0.625em; /* 10px */
${BorderRight}
${EllipseText}
}
`;