import type { Icon as IconType } from '@dnanpm/icons'; import type { ComponentType, MouseEvent } from 'react'; import React from 'react'; type Position = 'left' | 'right' | 'middle'; export interface IconProps { /** * Icon width and height passed to SVG element. * Icons can be scaled up by steps of 0.5rem (2.0rem, 2.5rem, 3.0rem) * * @default '1.5rem' */ size: IconType['size']; /** * Icon fill color passed to SVG element * * @default 'currentColor' */ color: IconType['color']; } export interface Props extends Partial { /** * Icon to render * * @type Icon */ icon: ComponentType; /** * On Icon click callback */ onClick?: (e: MouseEvent) => void; /** * Allows to set position of Icon component relative to other content and adds appropriate margins * * @param {Position} left Icon component is on the left side of content, add right margin * @param {Position} right Icon component is on the right side of content, add left margin * @param {Position} middle Icon component is in the middle of content, add left and right margins * * @default undefined */ position?: Position; /** * Allows to pass a custom className */ className?: string; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; /** * Allows to pass aria label for accessibility purposes */ 'aria-label'?: string; /** * Allows to pass aria hidden for accessibility purposes */ 'aria-hidden'?: boolean; } declare const Icon: ({ icon: IconParam, color, size, "data-testid": dataTestId, "aria-label": ariaLabel, "aria-hidden": ariaHidden, ...props }: Props) => React.JSX.Element; /** @component */ export default Icon;