maille
Version:
Component library for MithrilJS
17 lines (16 loc) • 503 B
TypeScript
import m from "mithril";
import { ClassComponent, CVnode, Vnode } from "mithril";
interface SwitchAttrs {
className?: string;
disabled?: boolean;
on: boolean;
onclick?: SwitchCallbackFn;
outlined?: boolean;
}
declare type SwitchCallbackFn = (state: boolean) => void;
declare class Switch implements ClassComponent<SwitchAttrs> {
protected on: boolean;
constructor(vnode?: CVnode<SwitchAttrs>);
view(vnode: Vnode<SwitchAttrs>): m.Vnode<any, any>;
}
export default Switch;