feature use some material component

This commit is contained in:
RouxAntoine 2023-07-26 20:03:12 +02:00
parent 30b3a8832d
commit 881445590e
Signed by: antoine
GPG Key ID: 098FB66FC0475E70
2 changed files with 27 additions and 9 deletions

View File

@ -2,12 +2,30 @@
function ListData({datas}) {
return (
<div>
{
datas.map((data, index) =>
<div key={index}>{data.name}</div>
)
}
</div>
<MaterialUI.List sx={{width: '100%', maxWidth: 360, bgcolor: 'background.paper'}}>
{datas.map((data, index) =>
<div key={index}>
<MaterialUI.ListItem alignItems="flex-start">
<MaterialUI.ListItemText
primary={`Node ${data.name}`}
secondary={
<React.Fragment>
<MaterialUI.Typography
sx={{display: 'inline'}}
component="span"
variant="body2"
color="text.primary"
>
to Scott, Alex, Jennifer
</MaterialUI.Typography>
{" — Wish I could come, but I'm out of town this…"}
</React.Fragment>
}
/>
</MaterialUI.ListItem>
{( index !== datas.length -1 ? <MaterialUI.Divider variant="inset" component="li"/> : '' )}
</div>
)}
</MaterialUI.List>
)
}

View File

@ -13,9 +13,9 @@ function Nodes({criteria}) {
}, [criteria]);
return (
<div>
<MaterialUI.Card variant="outlined">
<div>nodes</div>
<ListData datas={nodes}/>
</div>
</MaterialUI.Card>
);
}