adwaita-web
Version:
A GTK inspired toolkit designed to build awesome web apps
31 lines (30 loc) • 1.16 kB
TypeScript
import React from "react";
import type { ExtendElementProps } from "../utils/extendElementProp";
export declare type CheckboxProps = ExtendElementProps<"label", {
/** The checkbox label */
label?: string;
/** Size of the checkbox. */
size?: "mini" | "small" | "medium" | "large" | "huge" | "mega";
/** Whether to show the checkbox label. */
showLabel?: boolean;
/** The current value of the checkbox. */
value?: boolean;
/** Default value of the checkbox. */
defaultValue?: boolean;
/** Whether the checkbox is disabled. */
disabled?: boolean;
/** A callback function that is called when the checkbox is changed. */
onChange?: (value: boolean, ev: React.ChangeEvent<HTMLInputElement>) => void;
}>;
/** A input element that allows the user to select multiple options. */
export declare class Checkbox extends React.Component<CheckboxProps> {
static defaultProps: {
showLabel: boolean;
size: string;
onChange: () => void;
};
id: string;
constructor(props: CheckboxProps);
onChange: (ev: React.ChangeEvent<HTMLInputElement>) => void;
render(): JSX.Element;
}