@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.
27 lines • 1.26 kB
TypeScript
import * as React from 'react';
import type { FloatingRootContext } from "../../floating-ui-react/index.js";
import type { TransitionStatus } from "../../utils/useTransitionStatus.js";
import type { HTMLProps } from "../../utils/types.js";
import type { PreviewCardRoot } from "./PreviewCardRoot.js";
export interface PreviewCardTriggerDelayConfig {
delay?: number;
closeDelay?: number;
}
export interface PreviewCardRootContext {
open: boolean;
setOpen: (open: boolean, eventDetails: PreviewCardRoot.ChangeEventDetails) => void;
setTriggerElement: (el: Element | null) => void;
positionerElement: HTMLElement | null;
setPositionerElement: (el: HTMLElement | null) => void;
mounted: boolean;
setMounted: React.Dispatch<React.SetStateAction<boolean>>;
triggerProps: HTMLProps;
popupProps: HTMLProps;
floatingRootContext: FloatingRootContext;
transitionStatus: TransitionStatus;
popupRef: React.RefObject<HTMLElement | null>;
onOpenChangeComplete: ((open: boolean) => void) | undefined;
writeDelayRefs: (config: PreviewCardTriggerDelayConfig) => void;
}
export declare const PreviewCardRootContext: React.Context<PreviewCardRootContext | undefined>;
export declare function usePreviewCardRootContext(): PreviewCardRootContext;