UNPKG

@kaspersky/components

Version:

Kaspersky Design System UI Kit

50 lines (49 loc) 1.9 kB
import React from 'react'; import { Theme } from '../../design-system/types/index.js'; import { TestingProps, ToViewProps } from '../../helpers/typesHelpers.js'; import { Focus } from '../../design-system/tokens/focus.js'; export declare type ActionButtonSize = 'large' | 'medium' | 'small'; declare type StateProps = { background?: string; text?: string; }; export declare type ActionButtonMode = 'ghost' | 'ghostInverted' | 'filled' | 'filledInverted'; export declare type ActionButtonColorConfig = Focus & { normal?: StateProps; hover?: StateProps; active?: StateProps; disabled?: StateProps; }; export declare type ActionButtonSizeConfig = { padding?: string; gap?: string; paddingLabel?: string; paddingIcon?: string; }; export declare type ActionButtonCssConfig = ActionButtonColorConfig & ActionButtonSizeConfig; export declare type ActionButtonThemeProps = { /** Custom theme */ theme?: Theme; /** Size */ size?: ActionButtonSize; /** Color mode */ mode?: ActionButtonMode; }; export declare type ActionButtonHTMLProps = React.ButtonHTMLAttributes<HTMLButtonElement>; export declare type ActionButtonCustomProps = { /** Icon component instead of default "cross" icon */ icon?: React.ReactNode; /** Without icon */ noIcon?: boolean; /** If interactive */ interactive?: boolean; } & ActionButtonThemeProps & TestingProps; export declare type ActionButtonProps = ActionButtonHTMLProps & ActionButtonCustomProps; export declare type ActionButtonViewProps = ToViewProps<ActionButtonProps, ActionButtonCssConfig, Omit<ActionButtonThemeProps, 'size'>>; /** @deprecated Use ActionButtonCssConfig instead */ export declare type ActionButtonConfig = ActionButtonColorConfig; /** @deprecated */ export declare type ActionButtonThemeConfig = { [key in ActionButtonMode]: ActionButtonColorConfig; }; export {};