-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathtabs.ts
More file actions
96 lines (83 loc) · 2.08 KB
/
tabs.ts
File metadata and controls
96 lines (83 loc) · 2.08 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { darken } from 'polished';
import { Tabs as ReactTabs } from 'react-tabs';
import styled from '../styled-components';
export { Tab, TabList, TabPanel } from 'react-tabs';
export const Tabs = styled(ReactTabs)`
padding: 10px 20px 20px;
color: rgb(245, 247, 250);
border-radius: 0 0 4px 4px;
background-color: rgb(82, 96, 109);
> ul {
list-style: none;
padding: 0;
margin: 0 0 10px;
border-bottom: 4px solid rgb(97, 110, 124);
> li {
padding: 5px 10px;
display: inline-block;
background-color: rgb(82, 96, 109);
cursor: pointer;
text-align: center;
outline: none;
color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)};
min-width: 60px;
font-size: 0.9em;
font-weight: bold;
&.react-tabs__tab--selected {
color: white;
background: rgb(50, 63, 75);
border-bottom: 4px solid rgb(89, 195, 255);
margin-bottom: -4px;
}
&:only-child {
flex: none;
min-width: 100px;
}
}
> li:first-of-type {
border-top-left-radius: 4px;
}
> li:last-of-type {
border-top-right-radius: 4px;
}
}
> .react-tabs__tab-panel {
background: ${({ theme }) => theme.codeBlock.backgroundColor};
& > div,
& > pre {
margin-top: 10px;
}
& > div > pre {
padding: 10px;
}
}
`;
export const SmallTabs = styled(Tabs)`
> ul {
display: block;
> li {
padding: 2px 5px;
min-width: auto;
margin: 0 15px 0 0;
font-size: 13px;
font-weight: normal;
border-bottom: 1px dashed;
color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)};
border-radius: 0;
background: none;
&:last-child {
margin-right: 0;
}
&.react-tabs__tab--selected {
color: ${({ theme }) => theme.rightPanel.textColor};
background: none;
}
}
}
> .react-tabs__tab-panel {
& > div,
& > pre {
padding: ${props => props.theme.spacing.unit * 2}px 10px;
}
}
`;