UNPKG

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

Version:

Fluid Design System React

40 lines (39 loc) 1.11 kB
import React, { ComponentPropsWithoutRef } from 'react'; import { IBadgeProps } from '../badge/NJBadge'; export declare const NJTab: React.ForwardRefExoticComponent<ITabProps & React.RefAttributes<HTMLButtonElement>>; export interface ITabProps extends Omit<ComponentPropsWithoutRef<'button'>, 'onClick'> { /** * Tab id */ id: string; /** * Tab label */ label: string; /** * Whether tab is active or not */ isActive?: boolean; /** * Whether tab is disabled or not */ isDisabled?: boolean; /** * Aria controls */ ariaControls: string; /** * Function called when the tab is clicked * @param id tab id * @param label tab label * @param e event */ onClick?: (id: string, label: string, e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; /** * Options for the badge inside the tab. * Check out `NJBadge` for the list of available options. */ badgeOptions?: Omit<IBadgeProps, 'size' | 'children' | 'icon' | 'iconName'> & { children: number; }; }