From 590d5acde5cd3e488611618614d10fbc7e2aa0a9 Mon Sep 17 00:00:00 2001 From: Francisco Mazzoni Date: Mon, 8 Aug 2022 15:44:44 -0300 Subject: [PATCH 1/2] add radix props to modal --- src/components/Modal/Modal.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 96135486..7071760a 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -10,6 +10,7 @@ import { Transition } from '@headlessui/react' import styleHandler from '../../lib/theme/styleHandler' // import { Transition } from '@tailwindui/react' +export type ModalProps = RadixProps & Props interface RadixProps extends Dialog.DialogProps, @@ -80,7 +81,8 @@ const Modal = ({ overlayClassName, triggerElement, header, -}: Props) => { + ...props +}: ModalProps) => { const [open, setOpen] = React.useState(visible ? visible : false) const __styles = styleHandler('modal') @@ -159,6 +161,7 @@ const Modal = ({ {header &&
{header}
} {/*
Date: Mon, 8 Aug 2022 17:33:41 -0300 Subject: [PATCH 2/2] fix: surface radix prop on modal --- src/components/Modal/Modal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 7071760a..0df188ed 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -10,6 +10,7 @@ import { Transition } from '@headlessui/react' import styleHandler from '../../lib/theme/styleHandler' // import { Transition } from '@tailwindui/react' +// Merge Radix Props to surface in the modal component export type ModalProps = RadixProps & Props interface RadixProps