import React from 'react'; import { SpaceProps } from 'styled-system'; import { ColorProps } from '../utils/color-props'; /** * Prop Types of an Icon component. * Apart from props defined below it extends all {@link ColorProps} and {@link SpaceProps} * * @memberof Icon * @alias IconProps * @property {string} [...] Other props from {@link ColorProps} and {@link SpaceProps} */ export declare type IconProps = SpaceProps & ColorProps & { /** * CamelCased name of an icon from https://www.carbondesignsystem.com/guidelines/icons/library/ */ icon?: string; /** * Size variant. Default to 16 */ size?: 16 | 20 | 24 | 32; /** * Icon color */ color?: string; /** * Icon background */ bg?: string; /** * If background should be rounded */ rounded?: boolean; /** * Indicates if given icons should spin */ spin?: boolean; }; /** * @classdesc * * * * Component wrapping [@carbon/icons-react](https://www.npmjs.com/package/@carbon/icons-react). * List of all icons can be found here: https://www.carbondesignsystem.com/guidelines/icons/library/ * but keys are not always 1 to 1 in a relation to the `icons-react` library. * If you have problem verifying the key of given icon - you can always open the * Chrome Terminal (with AdminBro open) and write there: * * ``` * Object.keys(CarbonIcons) * ``` * * to see list of all possible icon keys. * * ### Usage * * ```javascript * import { Icon, IconProps } from '@admin-bro/design-system' * ``` * * @component * @subcategory Atoms * @see IconProps * @see {@link https://storybook.adminbro.com/?path=/story/designsystem-atoms-icon--default Storybook} * @hideconstructor * @example Icons inside other elements * return ( * * * * * ) * @example Different sizes * const sizes = [16, 20, 24, 32] * return ( * * {sizes.map(size => ( * * ))} * * ) * * @example Big rounded icon with background * return ( * * * * ) * @section design-system */ declare const Icon: React.FC; export { Icon }; export default Icon;