@@ -84,7 +88,7 @@ const ModalRenderer = ({
return (
-
+
)
}
@@ -118,3 +122,13 @@ export const MultiScreen: Story = {
)
},
}
+
+export const CustomClassName: Story = {
+ render: () => {
+ return (
+
+
+
+ )
+ },
+}
diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx
index 0f6e912d..0efcb7f2 100644
--- a/src/components/Modal/index.tsx
+++ b/src/components/Modal/index.tsx
@@ -9,15 +9,13 @@ import {
} from '@radix-ui/react-dialog'
import { useModal } from '@/hooks/useModal'
import { cn } from '@/lib/utils'
-import { IconButton } from '@/components/IconButton'
import { Icon } from '../Icon'
export interface ModalProps {
- closable?: boolean
className?: string
}
-export const Modal = ({ closable = false, className }: ModalProps) => {
+export const Modal = ({ className }: ModalProps) => {
const { screens, currentIndex, isOpen, close } = useModal()
const currentScreen = screens[currentIndex]
@@ -25,33 +23,27 @@ export const Modal = ({ closable = false, className }: ModalProps) => {
if (!isOpen) return null
if (!currentScreen) return null
+ const closable = currentScreen.closable
+
return (