framework/js/dist-typings/common/components/Checkbox.d.ts
flarum-bot c3a684c7ed Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-05-12 23:29:46 +00:00

31 lines
933 B
TypeScript

/**
* The `Checkbox` component defines a checkbox input.
*
* ### Attrs
*
* - `state` Whether or not the checkbox is checked.
* - `className` The class name for the root element.
* - `disabled` Whether or not the checkbox is disabled.
* - `loading` Whether or not the checkbox is loading.
* - `onchange` A callback to run when the checkbox is checked/unchecked.
* - `children` A text label to display next to the checkbox.
*/
export default class Checkbox extends Component<import("../Component").ComponentAttrs> {
constructor();
/**
* Get the template for the checkbox's display (tick/cross icon).
*
* @return {*}
* @protected
*/
protected getDisplay(): any;
/**
* Run a callback when the state of the checkbox is changed.
*
* @param {Boolean} checked
* @protected
*/
protected onchange(checked: boolean): void;
}
import Component from "../Component";