mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix: correctly dismissable default value (#4524)
* fix: correctly dismissable default value * fix: correctly dismissable default value * chore(changeset): update package name --------- Co-authored-by: աӄա <wingkwong.code@gmail.com>
This commit is contained in:
parent
2573e8269b
commit
5e3054e318
6
.changeset/lucky-parrots-compete.md
Normal file
6
.changeset/lucky-parrots-compete.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@heroui/popover": patch
|
||||
"@heroui/modal": patch
|
||||
---
|
||||
|
||||
Correctly dismissable default value
|
||||
@ -69,9 +69,17 @@ interface Props extends HTMLHeroUIProps<"section"> {
|
||||
* ```
|
||||
*/
|
||||
classNames?: SlotsToClasses<ModalSlots>;
|
||||
/**
|
||||
* 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<AriaModalOverlayProps, "isDismissable"> &
|
||||
ModalVariantProps;
|
||||
|
||||
export function useModal(originalProps: UseModalProps) {
|
||||
const globalContext = useProviderContext();
|
||||
|
||||
@ -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<AriaPopoverProps, "placement"> & AriaOverlayProps;
|
||||
export type ReactAriaPopoverProps = Props &
|
||||
Omit<AriaPopoverProps, "placement"> &
|
||||
Omit<AriaOverlayProps, "isDismissable">;
|
||||
|
||||
/**
|
||||
* Provides the behavior and accessibility implementation for a popover component.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user