UNPKG

@rws-aoa/react-library

Version:

RWS AOA Design System

27 lines 962 B
import { ButtonTypeMap, ButtonProps as MUIButtonProps } from '@mui/material'; import { ButtonHTMLAttributes } from 'react'; interface CommonProps { /** * Data-qa tag for E2E test purposes */ 'data-qa'?: string; /** * Defines the colour and style of the button */ type: 'primary' | 'secondary' | 'text'; } export type AoaButtonProps = Omit<MUIButtonProps<ButtonTypeMap['defaultComponent'], CommonProps>, 'variant'> & { readonly buttonType?: ButtonHTMLAttributes<HTMLButtonElement>['type']; }; /** * Constructs a button using pre-defined Rijks styling * * @param props - Props to pass to the button * @example * ```jsx * <AoaButton onClick={() => console.log()} type='primary'>button</AoaButton> * ``` */ export declare function AoaButton({ type, startIcon, 'data-qa': dataQa, children, buttonType, ...props }: AoaButtonProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=Button.d.ts.map