@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
27 lines (26 loc) • 1.09 kB
TypeScript
import { IconName } from '../../types';
import { IconProps } from '../Icon/Icon';
import { FlagColor } from './Flag.utils';
import { JSX } from 'react';
export interface FlagProps extends React.HTMLAttributes<HTMLSpanElement> {
/** Content within the Flag. */
children: React.ReactNode;
/**
* Background color of the Flag. It can either be a predefined color token (recommended) or a custom color value (e.g. #F37A1F).
*
* Possible predefined values: `grey-light` `yellow-light` `red-light` `green-light` `orange-base`
*
* @default 'grey-light'
*/
color: FlagColor;
/** Name of the icon to display. */
iconName?: IconName;
/** URL or path for a custom icon. */
iconSource?: IconProps['source'];
}
/**
* A read-only component, often representing a status or category.
*
* Design in Figma: [Flag](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/Core-Components-%F0%9F%92%A0?node-id=19511-2443)
* */
export declare const DSFlag: ({ children, className, color, iconName, iconSource, ...rest }: FlagProps) => JSX.Element;