diff --git a/.changeset/lucky-parrots-compete.md b/.changeset/lucky-parrots-compete.md new file mode 100644 index 0000000000..524fd8cd2b --- /dev/null +++ b/.changeset/lucky-parrots-compete.md @@ -0,0 +1,6 @@ +--- +"@heroui/popover": patch +"@heroui/modal": patch +--- + +Correctly dismissable default value diff --git a/packages/components/modal/src/use-modal.ts b/packages/components/modal/src/use-modal.ts index 9e041ce54d..7de946e710 100644 --- a/packages/components/modal/src/use-modal.ts +++ b/packages/components/modal/src/use-modal.ts @@ -74,9 +74,17 @@ interface Props extends HTMLNextUIProps<"section"> { * ``` */ classNames?: SlotsToClasses; + /** + * Whether to close the overlay when the user interacts outside it. + * @default true + */ + isDismissable?: boolean; } -export type UseModalProps = Props & OverlayTriggerProps & AriaModalOverlayProps & ModalVariantProps; +export type UseModalProps = Props & + OverlayTriggerProps & + Omit & + ModalVariantProps; export function useModal(originalProps: UseModalProps) { const globalContext = useProviderContext(); diff --git a/packages/components/popover/src/use-aria-popover.ts b/packages/components/popover/src/use-aria-popover.ts index 9eeacf1259..7d686a5136 100644 --- a/packages/components/popover/src/use-aria-popover.ts +++ b/packages/components/popover/src/use-aria-popover.ts @@ -42,9 +42,16 @@ export interface Props { * @default true */ shouldCloseOnScroll?: boolean; + /** + * Whether to close the overlay when the user interacts outside it. + * @default true + */ + isDismissable?: boolean; } -export type ReactAriaPopoverProps = Props & Omit & AriaOverlayProps; +export type ReactAriaPopoverProps = Props & + Omit & + Omit; /** * Provides the behavior and accessibility implementation for a popover component.