UNPKG

@clubmed/trident-ui

Version:

Shared ClubMed React UI components

53 lines (52 loc) 1.7 kB
import { ButtonHTMLAttributes, FunctionComponent, ReactNode } from 'react'; import { ButtonProps as ButtonPropsV2 } from './v2/Button'; import { IconicNames, IconicTypes } from '@clubmed/trident-icons'; export declare const BUTTON_THEME_LEGACY: any; export declare const BUTTON_VARIANT_LEGACY: any; export type ButtonPropsLegacy = { /** * Button themes defining background color and text/icon color */ theme?: 'yellow' | 'white' | 'black' | 'whiteStroke' | 'blackStroke' | ButtonPropsV2['theme']; /** * Is it a text button? An icon button? An arrow button? */ variant?: 'text' | 'textSmall' | 'icon' | 'arrow' | 'monogram' | ButtonPropsV2['variant']; /** * Background Color override * Ideally please use ONLY for the "white" and "black" themes * @deprecated */ backgroundOverride?: string; /** * Button contents * @deprecated */ label?: string; /** * Optional children (you might never use this, please actually try to avoid it) */ children?: ReactNode; /** * Optional icon name */ icon?: IconicNames; /** * Force the icon type to be svg, font or default */ iconType?: IconicTypes; /** * Group name * Used to group buttons together (you might not need this) * @deprecated */ groupName?: string; /** * @deprecated use `data-testid` instead */ dataTestId?: string; }; export type CommonButtonProps = Omit<ButtonPropsV2, 'theme' | 'variant'> & ButtonPropsLegacy; type ButtonProps = CommonButtonProps & ButtonHTMLAttributes<HTMLButtonElement>; export declare const Button: FunctionComponent<ButtonProps>; export {};