UNPKG

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

Version:

Fluid Design System React

34 lines (33 loc) 1.2 kB
import React from 'react'; import { WithHTMLAttributes } from '../../utils/typeHelpers'; export declare const NJSegmentedControlButton: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, keyof ISegmentedControlButtonCustomProps> & ISegmentedControlButtonCustomProps & React.RefAttributes<HTMLButtonElement>>; export interface ISegmentedControlButtonCustomProps { /** * SegmentedControlButton label */ label: string; /** * SegmentedControlButton icon name */ iconName?: string; /** * SegmentedControlButton icon name */ iconClass?: string; /** * Button value */ value: string; /** * Whether button is disabled or not */ isDisabled?: boolean; /** * Function called when the button is clicked * @param value button id * @param label button label * @param event event */ onClick?: (value: string, label: string, event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; } export type ISegmentedControlButtonProps = WithHTMLAttributes<ISegmentedControlButtonCustomProps, 'button'>;