UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

24 lines (23 loc) 1.03 kB
import { TabProperties } from '@engie-group/fluid-types'; import { AsChild, HTMLAttributesWithoutComponentProps } from '../../utils/typeHelpers'; import { NJBadgeProps } from '../badge/NJBadge'; export declare const NJTab: import("react").ForwardRefExoticComponent<NJTabProps & import("react").RefAttributes<HTMLButtonElement>>; type NJTabCommonProps = TabProperties & { isActive?: boolean; /** * Function called when the tab is clicked * @param id tab id * @param label tab label * @param e event */ onClick?: (id: string, label: TabProperties['label'], e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; /** * Options for the badge inside the tab. * Check out `NJBadge` for the list of available options. */ badgeOptions?: Omit<NJBadgeProps, 'size' | 'children' | 'icon' | 'iconName'> & { children: number; }; }; export type NJTabProps = NJTabCommonProps & AsChild<HTMLAttributesWithoutComponentProps<'button', NJTabCommonProps>>; export {};