dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
29 lines • 1.92 kB
TypeScript
import { ElementDataType } from '../../types';
import * as PopoverPrimitive from '@radix-ui/react-popover';
import * as React from 'react';
/**
* Popover primitives for floating content triggered by another element.
*/
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
/**
* PopoverContent - The floating panel that appears near the trigger.
* @returns {JSX.Element} The rendered PopoverContent component.
* @param {object} props - The properties for the component.
* @param {string} [props.className] - Additional classes for the popover content.
* @param {'start' | 'center' | 'end'} [props.align='center'] - The alignment of the popover content relative to the trigger.
* @param {number} [props.sideOffset=4] - The distance between the trigger and the popover content.
*/
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
/**
* Props aggregation for components that wrap Popover primitives.
* Useful for high-level components needing to forward props to specific Popover parts.
* @property {React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType} [triggerProps] - Props for the PopoverTrigger component.
* @property {React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType} [contentProps] - Props for the PopoverContent component.
*/
interface PopoverContainerProps {
triggerProps?: React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType;
contentProps?: React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType;
}
export { Popover, PopoverContent, PopoverTrigger, type PopoverContainerProps };
//# sourceMappingURL=popover.d.ts.map