flarum-bot 3d62a6af27 Bundled output for commit d268894e61b29dcc1b6f1919a2c919b08a758a8c
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-12-27 19:02:33 +00:00

31 lines
992 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, undefined> {
constructor();
/**
* Get the template for the checkbox's display (tick/cross icon).
*
* @return {import('mithril').Children}
* @protected
*/
protected getDisplay(): import('mithril').Children;
/**
* Run a callback when the state of the checkbox is changed.
*
* @param {boolean} checked
* @protected
*/
protected onchange(checked: boolean): void;
}
import Component from "../Component";