From 0e373cfb9829287d8619db717cf9a664c43337e8 Mon Sep 17 00:00:00 2001 From: danidfra Date: Wed, 14 Aug 2024 18:54:53 -0300 Subject: [PATCH] update modal to accept background and shadow as props --- src/components/ui/modal/modal.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ui/modal/modal.tsx b/src/components/ui/modal/modal.tsx index d75b1146a..2781bd0c9 100644 --- a/src/components/ui/modal/modal.tsx +++ b/src/components/ui/modal/modal.tsx @@ -45,8 +45,12 @@ interface IModal { confirmationFullWidth?: boolean; /** Callback when the modal is closed. */ onClose?: () => void; - /** Set whether the modal has padding. */ + /** Sets whether the modal will have a custom padding different from the default one. */ padding?: string; + /** Sets whether the modal will have a custom shadow different from the default one. */ + shadow?: string; + /** Sets whether the modal will have a custom background different from the default one. */ + background?: string; /** Callback when the secondary action is chosen. */ secondaryAction?: (event?: React.MouseEvent) => void; /** Secondary button text. */ @@ -76,6 +80,8 @@ const Modal = React.forwardRef(({ confirmationFullWidth, onClose, padding = 'p-6', + shadow = 'shadow-xl', + background = 'bg-white', secondaryAction, secondaryDisabled = false, secondaryText, @@ -98,7 +104,7 @@ const Modal = React.forwardRef(({