-
Notifications
You must be signed in to change notification settings - Fork 12
/
MappingButton.jsx
31 lines (29 loc) · 1009 Bytes
/
MappingButton.jsx
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
import React from 'react';
import { Button, ButtonGroup } from '@mui/material';
import { Link as LinkIcon } from '@mui/icons-material';
import { BLUE, WHITE, RED, BLACK } from '../../common/constants';
const MappingButton = ({label, mapType, onClick, retired, href}) => {
const style = retired ?
{background: 'lightgray', color: RED, boxShadow: 'none', textDecoration: 'line-through', textDecorationColor: BLACK, textTransform: 'none'} :
{background: BLUE, color: WHITE, boxShadow: 'none', textTransform: 'none'};
return (
<ButtonGroup variant='contained' style={{boxShadow: 'none'}}>
<Button
className='light-gray-bg'
href={href}
startIcon={<LinkIcon />}
onClick={onClick}
style={style}>
{label}
</Button>
<Button
href={href}
variant='contained'
onClick={onClick}
style={style}>
{mapType}
</Button>
</ButtonGroup>
)
}
export default MappingButton;