website refactor
This commit is contained in:
@@ -22,6 +22,7 @@ export interface ModalProps {
|
||||
footer?: ReactNode;
|
||||
description?: string;
|
||||
icon?: ReactNode;
|
||||
actions?: ReactNode;
|
||||
}
|
||||
|
||||
export const Modal = ({
|
||||
@@ -37,7 +38,8 @@ export const Modal = ({
|
||||
onSecondaryAction,
|
||||
footer,
|
||||
description,
|
||||
icon
|
||||
icon,
|
||||
actions
|
||||
}: ModalProps) => {
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
@@ -111,7 +113,10 @@ export const Modal = ({
|
||||
{description && <Box marginTop={1}><Text size="sm" variant="low">{description}</Text></Box>}
|
||||
</Box>
|
||||
</Box>
|
||||
<IconButton icon={X} onClick={handleClose} variant="ghost" title="Close modal" />
|
||||
<Box display="flex" alignItems="center" gap={2}>
|
||||
{actions}
|
||||
<IconButton icon={X} onClick={handleClose} variant="ghost" title="Close modal" />
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box flex={1} overflow="auto" padding={6}>
|
||||
|
||||
Reference in New Issue
Block a user