UNPKG

@stihl-design-system/components

Version:

Welcome to the STIHL Design System react component library.

24 lines (23 loc) • 1.29 kB
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, 'variant' | 'size' | 'theme'>; /** * 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 `variant`, `size`, or `theme` are detected—particularly for the `navigation` variant. * * Intended for development use only; should not be used in production environments. * * @param validationProps - An object containing the `variant`, `size`, and `theme` props * from the `DSButton` component. These are validated to ensure * they are used in supported combinations. */ export declare const validateButtonProps: ({ variant, size, theme, }: ValidationProps) => void; export {};