UNPKG

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

Version:

Fluid Design System React

40 lines (39 loc) 1.22 kB
import { Tokens } from '@engie-group/fluid-design-tokens'; import React from 'react'; import { TBrandExtendedColorVariants } from '../../global'; export declare const NJIcon: React.ForwardRefExoticComponent<IIconProps & React.RefAttributes<HTMLElement>>; export interface IIconProps { /** * Material icon name https://material.io/resources/icons/?style=baseline */ name: string; /** * Icon variant theme */ variant?: TBrandExtendedColorVariants | 'inherit' | 'secondary' | 'tertiary' | 'inverse'; /** * Icon size */ size?: keyof typeof Tokens.semantic.size.icon | 'inherit'; /** * Text alternative for assistive technologies * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label */ ariaLabel?: string; /** * Function called when icon is clicked * * @deprecated */ onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>; /** * Function called when * * @deprecated */ onKeyPress?: React.KeyboardEventHandler<HTMLButtonElement | HTMLAnchorElement>; /** * Optional additional className */ className?: string; }