You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
596 B
22 lines
596 B
4 years ago
|
import { useState } from 'react';
|
||
|
import { Switch, Grid } from '@material-ui/core';
|
||
|
import { HeaderText } from './Text';
|
||
|
|
||
|
const SelectedAnvil = ({ anvil }: { anvil: AnvilListItem }): JSX.Element => {
|
||
|
const [checked, setChecked] = useState<boolean>(true);
|
||
|
|
||
|
return (
|
||
|
<>
|
||
|
<Grid item xs={6}>
|
||
|
<HeaderText text={anvil?.anvil_name} />
|
||
|
<HeaderText text={anvil?.anvil_state || 'State unavailable'} />
|
||
|
</Grid>
|
||
|
<Grid item xs={3}>
|
||
|
<Switch checked={checked} onChange={() => setChecked(!checked)} />
|
||
|
</Grid>
|
||
|
</>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default SelectedAnvil;
|