Create DialogField component

This commit is contained in:
Mathias Wagner
2024-07-22 17:21:02 +02:00
parent 4429ab0e22
commit 89c44b87e4
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
import {Stack, Typography} from "@mui/material";
import {ChevronRight} from "@mui/icons-material";
export const DialogField = ({icon, title, description, onClick}) => {
return (
<Stack direction="row" justifyContent="space-between" alignItems="center"
onClick={onClick} sx={{border: 1, borderColor: 'divider', borderRadius: 1.5, p: 1.5, cursor: "pointer"}}>
<Stack direction="row" alignItems="center" gap={2}>
{icon}
<Stack direction="column">
<Typography variant="h6" fontWeight={600}>{title}</Typography>
<Typography variant="body2" color="text.secondary"
sx={{maxWidth: 250, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap'}}>
{description}
</Typography>
</Stack>
</Stack>
<ChevronRight/>
</Stack>
)
}

View File

@ -0,0 +1 @@
export {DialogField as default} from "./DialogField.jsx";