UNPKG

infinity-ui-elements

Version:

A React TypeScript component library with Tailwind CSS design system

91 lines 2.26 kB
import * as React from "react"; import type { IconName } from "../../lib/icons"; export interface SidePanelProps { /** * Whether the side panel is open */ isOpen: boolean; /** * Callback when the side panel should close */ onClose?: () => void; /** * Side panel title - optional */ title?: string; /** * Icon to display before the title - optional */ titleIcon?: IconName | React.ReactNode; /** * Side panel description/subtitle - optional */ description?: string; /** * Side panel footer content - optional */ footer?: React.ReactNode; /** * Side panel body content */ children: React.ReactNode; /** * Position from which the side panel appears */ position?: "left" | "right" | "center"; /** * Width variant or custom width */ width?: "small" | "medium" | "large" | "xlarge" | string; /** * Whether to show the close button in header */ showCloseButton?: boolean; /** * Additional header actions (e.g., expand, minimize buttons) - optional */ headerActions?: React.ReactNode; /** * Whether clicking the overlay closes the side panel */ closeOnOverlayClick?: boolean; /** * Whether pressing Escape closes the side panel */ closeOnEscape?: boolean; /** * Custom class name for the side panel container */ className?: string; /** * Custom class name for the side panel content */ contentClassName?: string; /** * Custom class name for the header */ headerClassName?: string; /** * Custom class name for the body */ bodyClassName?: string; /** * Custom class name for the footer */ footerClassName?: string; /** * Custom class name for the overlay */ overlayClassName?: string; /** * ARIA label for accessibility */ ariaLabel?: string; /** * ARIA description for accessibility */ ariaDescribedBy?: string; } declare const SidePanel: React.ForwardRefExoticComponent<SidePanelProps & React.RefAttributes<HTMLDivElement>>; export { SidePanel }; //# sourceMappingURL=SidePanel.d.ts.map