-
Notifications
You must be signed in to change notification settings - Fork 9
/
Tab.styles.js
47 lines (39 loc) 路 1.04 KB
/
Tab.styles.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
import { css } from "styled-components";
import tokens from "@paprika/tokens";
import stylers from "@paprika/stylers";
const activeStyles = css`
border-bottom: ${tokens.spaceSm} solid ${tokens.color.green};
`;
const disabledStyles = css`
border-bottom: 0;
color: ${tokens.color.blackDisabled};
cursor: not-allowed;
`;
export const tabStyles = css`
${stylers.fontSize()};
background-color: ${tokens.color.white};
border: 0;
border-bottom: ${tokens.spaceSm} solid transparent;
border-radius: 0;
color: ${tokens.color.black};
display: inline-block;
margin: 0 0 0 ${stylers.spacer(4)};
padding: ${stylers.spacer(2)} 0 ${tokens.space} 0;
position: relative;
transition: border-color 0.3s ease;
${({ isDisabled }) => (isDisabled ? disabledStyles : null)}
${({ isSelected }) => (isSelected ? activeStyles : null)}
&:first-child {
margin-left: 0;
}
&:focus {
${stylers.z(1)}
}
&:hover {
border-color: ${tokens.color.creme};
}
&.tab-link {
color: ${tokens.color.black};
text-decoration: none;
}
`;