From 45fa8204e5aef13e99b9057adf9293669e499aac Mon Sep 17 00:00:00 2001 From: yosi <48201022+yosipy@users.noreply.github.com> Date: Tue, 27 Aug 2024 23:33:21 +0900 Subject: [PATCH] feat(Modal): added ariaHidden to Modal component Props. (#456) --- src/Modal/Modal.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Modal/Modal.tsx b/src/Modal/Modal.tsx index a2a9bdcc..5211c948 100644 --- a/src/Modal/Modal.tsx +++ b/src/Modal/Modal.tsx @@ -14,11 +14,21 @@ export type ModalProps = React.HTMLAttributes & open?: boolean responsive?: boolean backdrop?: boolean + ariaHidden?: boolean } const Modal = forwardRef( ( - { children, open, responsive, backdrop, dataTheme, className, ...props }, + { + children, + open, + responsive, + backdrop, + ariaHidden, + dataTheme, + className, + ...props + }, ref ): JSX.Element => { const containerClasses = twMerge( @@ -29,13 +39,14 @@ const Modal = forwardRef( }) ) + ariaHidden = ariaHidden ?? !open const bodyClasses = twMerge('modal-box', className) return (