Newer
Older
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
import React, { ReactNode } from 'react'
import CardActionArea, {
CardActionAreaProps,
} from '@material-ui/core/CardActionArea'
import CardContent from '@material-ui/core/CardContent'
import { withStyles } from '@material-ui/core/styles'
const CardBase = withStyles({
root: {
background: 'linear-gradient(180deg, #323339 0%, #25262B 100%)',
border: '1px solid',
boxSizing: 'border-box',
boxShadow: '0px 4px 16px black',
borderRadius: '4px',
margin: '10px 0px 10px 0px',
padding: '0.5rem 1rem',
minHeight: '72px',
},
})(CardActionArea)
const CardUnlocked = withStyles({
root: {
border: '1px solid var(--blue40)',
},
})(CardBase)
const CardGoldContentBase = withStyles({
root: {
color: 'white',
height: '100%',
padding: 0,
},
})(CardContent)
const CardContentBase = withStyles({
root: {
color: 'white',
height: '100%',
padding: 0,
},
})(CardContent)
interface StyledEcogestureCardProps extends CardActionAreaProps {
displayBorder?: boolean
}
const GenerateContentCard = (children: ReactNode): React.ReactFragment => {
return <CardGoldContentBase>{children}</CardGoldContentBase>
}
const StyledEcogestureCard: React.ComponentType<StyledEcogestureCardProps> = ({
displayBorder,
...props
}: StyledEcogestureCardProps) => {
if (displayBorder) {
return (
<CardUnlocked {...props}>
{GenerateContentCard(props.children)}
</CardUnlocked>
)
} else {
return (
<CardBase {...props}>
<CardContentBase>{props.children}</CardContentBase>
</CardBase>
)
}
}
export default StyledEcogestureCard