adwaveui
Version:
Interactive Web Components inspired by the Gtk Adwaita theme.
45 lines (44 loc) • 1.35 kB
TypeScript
import { BaseElement } from "../../base-elements";
import "../../index.css";
import { CustomKeyboardEvent, CustomMouseEvent } from "../../utils/events";
import { AttributeBool } from "../../utils/types";
import "./switch.css";
declare global {
namespace JSX {
interface AdwSwitchProps {
class?: string;
id?: string;
slot?: string;
style?: string;
active?: AttributeBool;
disabled?: AttributeBool;
name?: string;
form?: string;
onChange?: (e: SwitchChangeEvent) => void;
onchange?: string;
onClick?: (e: CustomMouseEvent<{}>) => void;
onclick?: string;
onKeyDown?: (e: CustomKeyboardEvent<{}>) => void;
onkeydown?: string;
}
interface IntrinsicElements {
"adw-switch": AdwSwitchProps;
}
}
}
declare class SwitchChangeEvent extends CustomEvent<{
active: boolean;
}> {
constructor(active: boolean);
}
export type { SwitchChangeEvent };
export declare class ADWaveSwitchElement extends BaseElement {
accessor active: boolean;
accessor disabled: boolean;
accessor name: string | null;
accessor form: string | null;
constructor();
private handleClick;
private handleKeyDown;
render(): JSX.Element;
}