..
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 | import React from 'react'
type BadgeConfig = {
name: string
value: string
color: string
}
const Badge: React.FC<BadgeConfig> = (config) => {
return (
<div
className="badge-wrapper"
style={{
height: 25,
backgroundColor: '#555',
display: 'flex',
margin: '0 7px'
}}>
<p
className="badge-label"
style={{
color: '#fff',
fontFamily: 'Jost',
fontSize: 11,
height: '100%',
letterSpacing: 1,
margin: 0,
textTransform: 'uppercase',
padding: '0 12px 0 10px',
display: 'flex',
alignItems: 'center'
}}>
{config.name}
</p>
<p
className="badge-value"
style={{
backgroundColor: config.color,
color: '#fff',
fontFamily: 'Jost',
fontSize: 11,
height: '100%',
letterSpacing: 1,
margin: 0,
padding: '0 8px',
display: 'flex',
alignItems: 'center',
marginLeft: -4,
marginRight: -4
}}>
{config.value}
</p>
</div>
)
}
export default Badge
|
|