mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Clear git cache
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
import { theme } from '../../themes';
|
||||
import { Box, Button, Text } from '..';
|
||||
import { Wrapper } from './styles';
|
||||
|
||||
type ModalProps = {
|
||||
color: 'client' | 'productOwner' | 'developer' | 'admin';
|
||||
title: string;
|
||||
description: string;
|
||||
children?: React.ReactNode | JSX.Element | string;
|
||||
onConfirm: () => void;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
const Modal = ({
|
||||
color,
|
||||
title,
|
||||
description,
|
||||
children,
|
||||
onConfirm,
|
||||
onClose,
|
||||
}: ModalProps) => {
|
||||
return (
|
||||
<Wrapper>
|
||||
<Box
|
||||
background={theme.colors.white.main}
|
||||
borderRadius='10px'
|
||||
padding='20px'
|
||||
display='grid'
|
||||
gridTemplateRows='auto'
|
||||
alignItems='center'
|
||||
rowGap='1rem'
|
||||
>
|
||||
<Text variant='headline' weight='bold' color={color}>
|
||||
{title}
|
||||
</Text>
|
||||
<Text variant='body' color={theme.colors.black.main}>
|
||||
{description}
|
||||
</Text>
|
||||
{children}
|
||||
<Box
|
||||
display='grid'
|
||||
gridTemplateColumns='repeat(2, auto)'
|
||||
justifyContent='flex-end'
|
||||
columnGap='1rem'
|
||||
>
|
||||
<Button color={color} text='Confirm' onClick={onConfirm} />
|
||||
<Button color={color} text='Cancel' onClick={onClose} />
|
||||
</Box>
|
||||
</Box>
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default Modal;
|
||||
Reference in New Issue
Block a user