Created switches

This commit is contained in:
2025-07-19 22:48:01 -04:00
parent 5421c2346a
commit ea7ac27772
18 changed files with 875 additions and 94 deletions

35
lib/types/Input.d.ts vendored
View File

@@ -1,3 +1,4 @@
import type React from "react";
import type { ChangeEventHandler } from "react";
@@ -16,7 +17,7 @@ export interface TextInputProps {
export interface SelectInputProps {
label: React.ReactNode;
value?: string;
onChange?: (newVlaue: string) => void;
onChange?: (newValue: string) => void;
children: React.ReactNode;
}
@@ -26,3 +27,35 @@ export interface OptionInputProps {
value: string;
children: React.ReactNode;
}
export type MattrixwvSwitchSize = "none" | "xs" | "sm" | "md" | "lg" | "xl";
export interface MattrixwvSwitchProps {
id?: string;
className?: string;
knobClassName?: string;
size?: MattrixwvSwitchSize;
wide?: boolean;
name?: string;
value?: string;
defaultChecked?: boolean;
checked?: boolean;
onChange?: (newChecked: boolean) => void;
disabled?: boolean;
children?: React.ReactNode;
offText?: React.ReactNode;
onText?: React.ReactNode;
}
export interface MattrixwvButtonSwitchProps {
id?: string;
className?: string;
name?: string;
value?: string;
defaultChecked?: boolean;
checked?: boolean;
onChange?: (newChecked: boolean) => void;
disabled?: boolean;
onNode: React.ReactNode;
offNode: React.ReactNode;
}