UNPKG

robust-react-ui

Version:

A React component library, built with a focus on accessibility, extensibility and reusability.

38 lines (37 loc) 1.06 kB
import React from 'react'; export interface IButtonProps { /** * Size setting for component. * @default medium */ size?: 'small' | 'medium' | 'large'; /** * Provides component with a colour theme. * @default primary */ variant?: 'primary' | 'danger' | 'success' | 'secondary'; children: React.ReactNode; /** * Provides the component with an id attribute. May be used for accessibility purposes. */ id?: string; tabIndex?: number; /** * Creates equal padding vertically and horizontally * @default false */ square?: boolean; /** * An accessible label. */ ariaLabel?: string; ariaControls?: string; /** * A function to be triggered on mouse click event. */ onClickFunction?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; /** * A function to be triggered on keydown event. */ onKeyDownFunction?: (event: React.KeyboardEvent<HTMLButtonElement>) => void; }