-
-
Notifications
You must be signed in to change notification settings - Fork 767
/
Copy pathbutton.tsx
67 lines (57 loc) · 1.66 KB
/
button.tsx
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 from "styled-components";
import { FONT_FAMILY_HEADING, THEME_COLORS } from "@/style";
import { IconContainer } from "./icon-container";
import { Link } from "./link";
export const Button = styled.button`
padding: 10px;
border-radius: var(--border-radius);
font-size: var(--font-size);
color: ${THEME_COLORS.textContrast};
background-color: ${THEME_COLORS.primary};
transition: background-color 0.2s ease-in-out;
&:hover {
background-color: ${THEME_COLORS.secondary};
}
`;
export const LinkButton = styled(Link)`
display: flex;
flex: 0 0 auto;
align-items: center;
box-sizing: border-box;
border-radius: var(--button-border-radius);
height: 48px;
padding: 0 30px;
border: 2px solid ${THEME_COLORS.primaryButtonBorder};
color: ${THEME_COLORS.primaryButtonText};
background-color: ${THEME_COLORS.primaryButton};
font-family: ${FONT_FAMILY_HEADING};
font-size: 1.125rem;
text-decoration: none;
font-weight: 500;
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out,
color 0.2s ease-in-out;
:hover {
border-color: ${THEME_COLORS.primaryButtonBorder};
color: ${THEME_COLORS.primaryButtonHoverText};
background-color: ${THEME_COLORS.primaryButtonHover};
}
`;
export const LinkTextButton = styled(Link)`
display: flex;
flex: 0 0 auto;
align-items: center;
height: 48px;
font-family: ${FONT_FAMILY_HEADING};
font-size: 1.125rem;
font-weight: 500;
& > ${IconContainer} {
margin-left: 10px;
& > svg {
fill: ${THEME_COLORS.link};
transition: fill 0.2s ease-in-out;
}
}
&:hover > ${IconContainer} > svg {
fill: ${THEME_COLORS.linkHover};
}
`;