UNPKG

@c15t/react

Version:

Developer-first CMP for React: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization

60 lines 2.06 kB
import type { FC, HTMLAttributes, ReactNode } from 'react'; import { type ThemeContextValue } from '../../../context/theme-context'; import type { ConsentManagerDialogTheme } from '../theme'; /** * Props for the root component of the ConsentManagerDialog. * * @public */ export interface ConsentManagerDialogRootProps extends ThemeContextValue<ConsentManagerDialogTheme>, HTMLAttributes<HTMLDialogElement> { /** * React children that will be rendered inside the dialog container. * Typically this includes `ConsentManagerDialog.Card` and its sub-components. */ children: ReactNode; /** * Explicitly control the open state of the dialog. If omitted, the dialog * relies on the consent manager (`isPrivacyDialogOpen`) value. */ open?: boolean; /** * When true, the component will not apply any internal styles. */ noStyle?: boolean; /** * Disable entrance / exit animations when true. */ disableAnimation?: boolean; /** * Lock body scroll while the dialog is open. Defaults to `true`. */ scrollLock?: boolean; /** * Trap focus within the dialog while it is open. Defaults to `true`. */ trapFocus?: boolean; /** * Custom backdrop element. Pass a React node to replace the built-in * semi-transparent overlay or pass `false` to render no backdrop at all. * * @default undefined (builtin overlay) */ overlay?: ReactNode | false; } /** * Provides theming context, focus-management and portal rendering for the * Consent Manager Dialog. This component is also exposed as * `ConsentManagerDialog.Root` to enable the compound-component usage: * * ```tsx * <ConsentManagerDialog.Root> * <ConsentManagerDialog.Card> * … * </ConsentManagerDialog.Card> * </ConsentManagerDialog.Root> * ``` */ declare const ConsentManagerDialogRoot: FC<ConsentManagerDialogRootProps>; declare const Root: FC<ConsentManagerDialogRootProps>; export { Root, ConsentManagerDialogRoot }; //# sourceMappingURL=root.d.ts.map