UNPKG

shadcn-react

Version:
41 lines (40 loc) 1.2 kB
/// <reference types="react" /> import { ButtonProps } from '../Button'; export interface SidebarGroupProps { title: React.ReactNode; children: SidebarItemProps[]; } export interface SidebarItemProps { value: string; title: React.ReactNode; icon?: React.ReactNode; badge?: React.ReactNode; /** * @default 'div' */ wrapper?: keyof JSX.IntrinsicElements | React.ComponentType<SidebarItemWrapperProps>; } export interface SidebarItemWrapperProps { value: string; children: React.ReactNode; } export declare function isSidebarGroup(props: SidebarGroupProps | SidebarItemProps): props is SidebarGroupProps; export interface SidebarProps { value?: string; defaultValue?: string; items: (SidebarGroupProps | SidebarItemProps)[]; /** * @default 'div' */ itemWrapper?: SidebarItemProps['wrapper']; width?: number | string; collapsed?: boolean; /** * @default 'default' */ selectedVariant?: ButtonProps['variant']; onChange?: (value: string) => any; className?: string; style?: React.CSSProperties; } export declare function Sidebar(props: SidebarProps): import("react/jsx-runtime").JSX.Element;