forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.tsx
More file actions
38 lines (32 loc) · 758 Bytes
/
elements.tsx
File metadata and controls
38 lines (32 loc) · 758 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
import styled from '../../../styled-components'
export const TableComponent = styled.table`
width: 100%;
table-layout: fixed;
border-collapse: collapse;
`
export const Headers = styled.thead``
export const Header = styled<
{
width: string
},
'th'
>('th')`
text-align: left;
width: ${({ width }) => width};
font-size: ${({ theme }) => theme.fontSize.small};
`
export const Body = styled.tbody``
export const RowComponent = styled.tr``
export const CellComponent = styled<
{
wordwrap?: string
mono?: boolean
colSpan?: number
},
'td'
>('td').attrs({
colSpan: ({ colSpan }) => colSpan,
})`
font-family: ${({ mono }) => (mono ? 'monospace' : 'inherit')};
word-wrap: ${({ wordwrap }) => wordwrap || 'normal'};
`