@abgov/react-components
Version:
Government of Alberta - UI components for React
48 lines (47 loc) • 1.54 kB
TypeScript
import { GoabCheckboxOnChangeDetail, Margins } from '@abgov/ui-components-common';
import { JSX } from 'react';
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"goa-checkbox": WCProps & React.HTMLAttributes<HTMLElement>;
}
}
}
interface WCProps extends Margins {
ref: React.RefObject<HTMLElement | null>;
id?: string;
name: string;
checked?: string;
indeterminate?: string;
disabled?: string;
error?: string;
text?: string;
value?: string | number;
arialabel?: string;
description?: string | React.ReactNode;
reveal?: React.ReactNode;
revealarialabel?: string;
maxwidth?: string;
testid?: string;
}
export interface GoabCheckboxProps extends Margins {
id?: string;
name: string;
checked?: boolean;
indeterminate?: boolean;
disabled?: boolean;
error?: boolean;
text?: string;
value?: string | number | boolean;
children?: React.ReactNode;
testId?: string;
ariaLabel?: string;
description?: string | React.ReactNode;
reveal?: React.ReactNode;
revealAriaLabel?: string;
maxWidth?: string;
onChange?: (detail: GoabCheckboxOnChangeDetail) => void;
}
export type Props = GoabCheckboxProps;
export declare function GoabCheckbox({ id, name, testId, error, disabled, checked, indeterminate, value, text, description, reveal, revealAriaLabel, maxWidth, children, onChange, ariaLabel, mt, mr, mb, ml, }: GoabCheckboxProps): JSX.Element;
export default GoabCheckbox;