mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 21:53:57 -05:00
Created switches
This commit is contained in:
35
lib/types/Input.d.ts
vendored
35
lib/types/Input.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user