mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
c3a684c7ed
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
31 lines
933 B
TypeScript
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";
|