@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
32 lines (31 loc) • 1.23 kB
TypeScript
import { HTMLProps, JSX, SVGProps } from 'react';
import { IconName, SelectedAriaAttributes, Theme } from '../../types';
import { IconAriaAttribute, IconSize } from './Icon.utils';
export interface IconProps {
/** ARIA attributes to enhance accessibility.
* `{'aria-label'? string;}`
*/
aria?: SelectedAriaAttributes<IconAriaAttribute>;
/** Name of the icon to display.
* @default 'placeholder'
*/
name?: IconName;
/** Size of the icon.
* @default 'large'
*/
size?: IconSize;
/** URL or path for a custom icon. */
source?: string;
/** Defines the theme.
* @default 'light'
*/
theme?: Theme;
}
/**
* The STIHL Iconography ranges from content and feature icons to product or system icons.
* The STIHL Design System is using an SVG icon system to visually present an icon object.
* Icons are provided as assets and can be bundled into the application.
*
* Design in Figma: [Icon](https://www.figma.com/design/U218NNP4OsipaHOtv5flns/Iconography-%E2%9E%A1%EF%B8%8F?node-id=0-1)
*/
export declare const DSIcon: ({ aria, className, name, size, source, theme, ...rest }: IconProps & (HTMLProps<HTMLImageElement> | SVGProps<SVGSVGElement>)) => JSX.Element;