@abgov/react-components
Version:
Government of Alberta - UI components for React
41 lines (40 loc) • 1.34 kB
TypeScript
import { ReactNode, JSX } from 'react';
import { GoabButtonSize, GoabButtonType, GoabButtonVariant, GoabIconType, Margins } from '@abgov/ui-components-common';
interface WCProps extends Margins {
type?: GoabButtonType;
size?: GoabButtonSize;
variant?: GoabButtonVariant;
disabled?: string;
leadingicon?: string;
trailingicon?: string;
width?: string;
testid?: string;
action?: string;
actionArgs?: string;
actionArg?: string;
ref: React.RefObject<HTMLElement | null>;
}
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"goa-button": WCProps & React.HTMLAttributes<HTMLElement>;
}
}
}
export interface GoabButtonProps extends Margins {
type?: GoabButtonType;
size?: GoabButtonSize;
variant?: GoabButtonVariant;
disabled?: boolean;
leadingIcon?: GoabIconType;
trailingIcon?: GoabIconType;
width?: string;
onClick?: () => void;
testId?: string;
action?: string;
actionArgs?: Record<string, unknown>;
actionArg?: string;
children?: ReactNode;
}
export declare function GoabButton({ disabled, type, size, variant, leadingIcon, trailingIcon, width, testId, children, onClick, mt, mr, mb, ml, action, actionArgs, actionArg, }: GoabButtonProps): JSX.Element;
export default GoabButton;