import * as React from 'react'; export type IconIcon = | string | React.ReactNode | ((...args: any[]) => any); export type IconSize = number | string | 'default' | 'medium' | 'large'; export type IconSpace = | string | number | boolean | { /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`. */ top?: string | number | boolean; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`. */ right?: string | number | boolean; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`. */ bottom?: string | number | boolean; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`. */ left?: string | number | boolean; }; export type IconTop = string | number | boolean; export type IconRight = string | number | boolean; export type IconBottom = string | number | boolean; export type IconLeft = string | number | boolean; export type IconWidth = string | number; export type IconHeight = string | number; export type IconBorder = string | boolean; export type IconInheritColor = string | boolean; export type IconSkeleton = string | boolean; export type IconAttributes = string | Object; export type IconChildren = React.ReactNode | ((...args: any[]) => any); /** * NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js". */ export interface IconProps extends React.HTMLProps { /** * A React SVG Component or the icon name (in case we use `IconPrimary` or `dnb-icon-primary`). */ icon?: IconIcon; /** * Modifier class to define. Will result in: `dnb-icon--${modifier}`. */ modifier?: string; /** * The dimension of the icon. This will be the `viewBox` and represent `width` and `height`. Defaults to `16`. You can use `small`,`medium`, `large` or `auto`. Auto will enable that the icon size gets inherited by the mother HTML element, if it provides a `font-size`. */ size?: IconSize; /** * Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`. */ space?: IconSpace; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`. */ top?: IconTop; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`. */ right?: IconRight; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`. */ bottom?: IconBottom; /** * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`. */ left?: IconLeft; width?: IconWidth; height?: IconHeight; /** * Use `true` to display a rounded border with an inherited color. Keep in mind that the icon will have a larger total width and height of `+0.5em`. */ border?: IconBorder; /** * Sets a color property to the `svg` markup. Default is no color, which means black */ color?: string; /** * Default to `true`. Set to `false` if you do not want to inherit the color by `currentColor`. */ inherit_color?: IconInheritColor; /** * The alternative label (text version) of the icon. Defaults to the imported icon name. */ alt?: string; /** * Use a title to provide extra information about the icon used. */ title?: string; skeleton?: IconSkeleton; attributes?: IconAttributes; className?: string; children?: IconChildren; } export default class Icon extends React.Component { static defaultProps: object; render(): JSX.Element; }