feat: create Anvil component

main
Josue 4 years ago committed by Tsu-ba-me
parent 3db6ca9c55
commit dc9db4f5dd
  1. 22
      striker-ui/components/Anvil.tsx

@ -0,0 +1,22 @@
import { useState } from 'react';
import { Switch, Grid } from '@material-ui/core';
import { HeaderText } from './Text';
const Anvil = ({ 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_status?.anvil_state || 'State unavailable'}
/>
</Grid>
<Grid item xs={3}>
<Switch checked={checked} onChange={() => setChecked(!checked)} />
</Grid>
</>
);
};
export default Anvil;
Loading…
Cancel
Save