import { PureComponent } from 'react'; import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome'; import { defaultProps } from './iconDefaultProps'; declare type IconSize = 'xs' | 'sm' | 'lg' | '2x' | '3x'; declare type IconPadding = 'none' | 'left' | 'right'; declare type IconColor = 'default' | 'warn' | 'error' | 'primaryBlue'; export interface IconTheme { readonly icon: string; readonly 'icon--huge': string; readonly 'icon--large': string; readonly 'icon--big': string; readonly 'icon--small': string; readonly 'icon--tiny': string; readonly 'icon--paddedLeft': string; readonly 'icon--paddedRight': string; readonly 'icon--spin': string; readonly 'icon--color-warn': string; readonly 'icon--color-error': string; readonly 'icon--color-primaryBlue': string; } export interface IconProps extends Omit { /** * We use the react component FortAwesome provides to render icons. * we will pass down all props to the component via {...rest} to expose it's api * https://github.com/FortAwesome/react-fontawesome/blob/master/README.md */ /** * The identifier of the icon to render. * Can be a font-awesome icon identifier or a asset resource. */ readonly icon?: string; /** * The (accessibility) label for this icon */ readonly label?: string; /** * Controls the padding around the icon in a standardized way. */ readonly padded?: IconPadding; /** * An optional `className` to attach to the wrapper. */ readonly className?: string; /** * Adjust the color of the icon */ readonly color?: IconColor; /** * Adjust the size of the icon */ readonly size?: IconSize; /** * An optional css theme to be injected. */ readonly theme?: IconTheme; } export { defaultProps }; declare class Icon extends PureComponent { static readonly defaultProps: Readonly>>; render(): JSX.Element | null; } export default Icon;