UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

39 lines (38 loc) 1.35 kB
import { ElementType, HTMLAttributes, ReactNode } from 'react'; import { PolymorphicRefForwardingComponent } from '../../helpers'; export interface CNavGroupProps extends HTMLAttributes<HTMLDivElement | HTMLLIElement> { /** * Component used for the root node. Either a string to use a HTML element or a component. * * @since 5.0.0 */ as?: ElementType; /** * A string of all className you want applied to the component. */ className?: string; /** * Make nav group more compact by cutting all `padding` in half. */ compact?: boolean; /** * Callback fired when the user toggles the group. Receives the requested visibility. Provide * it together with `visible` for controlled mode—update `visible` from here, or ignore the * change to keep the group as is. * * @since 5.12.0 */ onVisibleChange?: (visible: boolean) => void; /** * Set group toggler label. */ toggler?: string | ReactNode | (({ visible }: { visible: boolean; }) => ReactNode); /** * Show nav group items. Acts as the initial state when used on its own, or as the controlled * value when paired with `onVisibleChange`. */ visible?: boolean; } export declare const CNavGroup: PolymorphicRefForwardingComponent<'li', CNavGroupProps>;