This repository was archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 357
Expand file tree
/
Copy pathstyled.tsx
More file actions
62 lines (54 loc) · 1.36 KB
/
styled.tsx
File metadata and controls
62 lines (54 loc) · 1.36 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
import { ReactElement } from 'react'
import styled from 'styled-components'
import { Link } from 'react-router-dom'
import ChevronRightIcon from '@material-ui/icons/ChevronRight'
import { xs, lg, black500, extraLargeFontSize, largeFontSize } from 'src/theme/variables'
export const WidgetContainer = styled.section`
display: flex;
flex-direction: column;
`
export const DashboardTitle = styled.h1`
color: ${black500};
font-size: ${extraLargeFontSize};
width: 100%;
margin: 12px 12px -33px;
`
export const WidgetTitle = styled.h2`
color: ${black500};
font-size: ${largeFontSize};
margin-top: 0;
`
export const WidgetBody = styled.div`
display: flex;
flex-direction: column;
gap: 12px;
height: 100%;
`
export const Card = styled.div`
background: ${({ theme }) => theme.colors.white};
padding: ${lg};
border-radius: 8px;
flex-grow: 1;
position: relative;
box-sizing: border-box;
height: 100%;
& h2 {
margin-top: 0;
}
`
const StyledLink = styled(Link)`
text-decoration: none;
color: ${({ theme }) => theme.colors.primary};
font-weight: bold;
display: flex;
align-items: center;
gap: ${xs};
margin-bottom: 10px;
padding-right: 26px;
`
export const ViewAllLink = ({ url, text }: { url: string; text?: string }): ReactElement => (
<StyledLink to={url}>
{text || 'View All'}
<ChevronRightIcon />
</StyledLink>
)