@stihl-design-system/components
Version:
Welcome to the STIHL Design System react component library.
23 lines (22 loc) • 1.32 kB
TypeScript
import { ButtonProps } from './Button';
export declare const BUTTON_SIZE: readonly ["medium", "small"];
export type ButtonSize = (typeof BUTTON_SIZE)[number];
export declare const BUTTON_VARIANT: readonly ["highlight", "filled", "outline", "ghost", "navigation"];
export type ButtonVariant = (typeof BUTTON_VARIANT)[number];
export type ButtonIconPosition = 'left' | 'right';
export type ButtonAriaAttribute = 'aria-label' | 'aria-expanded' | 'aria-pressed' | 'aria-haspopup';
type ValidationProps = Pick<ButtonProps, 'hideLabel' | 'iconName' | 'iconSource' | 'isFlush' | 'size' | 'stretched' | 'theme' | 'variant'>;
/**
* Performs runtime validation on a subset of `DSButton` props to detect
* misconfigurations during development.
*
* This function provides warnings or throws errors when invalid combinations of props occur.
*
* Intended for development use only; should not be used in production environments.
*
* @param validationProps - An object containing the props to validate
* from the `DSButton` component. These are validated to ensure
* they are used in supported combinations.
*/
export declare const validateButtonProps: ({ hideLabel, iconName, iconSource, isFlush, size, stretched, theme, variant, }: ValidationProps) => void;
export {};