feat: create SelectedAnvil component for a selectd Anvil from AnvilList

main
Josue 4 years ago committed by Tsu-ba-me
parent 211613b110
commit 51c5a627aa
  1. 21
      striker-ui/components/SelectedAnvil.tsx

@ -0,0 +1,21 @@
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;
Loading…
Cancel
Save