Forgotten component ...
This commit is contained in:
parent
707d20c7d1
commit
063bee4e28
|
@ -0,0 +1,58 @@
|
|||
import { Component, JSXElement } from 'solid-js';
|
||||
import {
|
||||
Dialog as MuiDialog,
|
||||
DialogContent,
|
||||
DialogTitle,
|
||||
Grid,
|
||||
IconButton,
|
||||
} from '@suid/material';
|
||||
import CloseIcon from '@suid/icons-material/Close';
|
||||
|
||||
const Dialog: Component<{
|
||||
open: boolean;
|
||||
title: JSXElement;
|
||||
closeHandler: () => void;
|
||||
children: JSXElement;
|
||||
}> = (props) => {
|
||||
return (
|
||||
<MuiDialog
|
||||
onClose={props.closeHandler}
|
||||
open={props.open}
|
||||
PaperProps={{ sx: { minWidth: '300px' } }}
|
||||
>
|
||||
<DialogTitle
|
||||
sx={{
|
||||
backgroundColor: 'rgba(14, 116, 144, 0.7)',
|
||||
color: 'white',
|
||||
clear: 'both',
|
||||
paddingRight: '20px',
|
||||
}}
|
||||
>
|
||||
<Grid container spacing={2} alignItems='center'>
|
||||
<Grid item xs={11}>
|
||||
{props.title}
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
xs={1}
|
||||
sx={{
|
||||
alignSelf: 'right',
|
||||
marginRight: '0px',
|
||||
paddingRight: '0px',
|
||||
paddingTop: '16px',
|
||||
}}
|
||||
>
|
||||
<IconButton onClick={props.closeHandler}>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DialogTitle>
|
||||
<DialogContent sx={{ width: 'calc(100% - 60px)' }}>
|
||||
{props.children}
|
||||
</DialogContent>
|
||||
</MuiDialog>
|
||||
);
|
||||
};
|
||||
|
||||
export default Dialog;
|
|
@ -0,0 +1 @@
|
|||
export { default } from './Dialog';
|
Loading…
Reference in New Issue