UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

22 lines (21 loc) 785 B
import * as React from 'react'; import { OpenChangeReason } from '../../utils/translateOpenChangeReason.js'; export declare function useDialogClose(params: useDialogClose.Parameters): useDialogClose.ReturnValue; export declare namespace useDialogClose { interface Parameters { /** * Whether the dialog is currently open. */ open: boolean; /** * Event handler called when the dialog is opened or closed. */ setOpen: (open: boolean, event: Event | undefined, reason: OpenChangeReason | undefined) => void; } interface ReturnValue { /** * Resolver for the root element props. */ getRootProps: (externalProps: React.HTMLAttributes<any>) => React.HTMLAttributes<any>; } }