refactor: use the PanelHeader component with nodes to get the shifted header effecft

main
Josue 4 years ago committed by Tsu-ba-me
parent 0f8c2452fd
commit 185cf1398e
  1. 19
      striker-ui/components/AnvilNode.tsx

@ -3,6 +3,7 @@ import { Grid, Switch } from '@material-ui/core';
import InnerPanel from './InnerPanel'; import InnerPanel from './InnerPanel';
import ProgressBar from './ProgressBar'; import ProgressBar from './ProgressBar';
import { BodyText } from './Text'; import { BodyText } from './Text';
import PanelHeader from './PanelHeader';
const AnvilNode = ({ const AnvilNode = ({
node, node,
@ -16,14 +17,18 @@ const AnvilNode = ({
(n): JSX.Element => { (n): JSX.Element => {
return ( return (
<InnerPanel key={n.node_uuid}> <InnerPanel key={n.node_uuid}>
<Grid container alignItems="center" justify="space-around"> <PanelHeader>
<Grid item xs={6}> <Grid container alignItems="center" justify="space-around">
<BodyText text={`Node: ${n.node_name}`} /> <Grid item xs={7}>
</Grid> <BodyText text={`Node: ${n.node_name}`} />
<Grid item xs={3}> </Grid>
<Switch checked /> <Grid item xs={3}>
<Switch checked />
</Grid>
</Grid> </Grid>
<Grid item xs={6}> </PanelHeader>
<Grid container alignItems="center" justify="space-around">
<Grid item xs={5}>
<BodyText text={`State: ${n.state}`} /> <BodyText text={`State: ${n.state}`} />
</Grid> </Grid>
<Grid item xs={4}> <Grid item xs={4}>

Loading…
Cancel
Save