mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 13:43:59 -05:00
62 lines
1.3 KiB
TypeScript
62 lines
1.3 KiB
TypeScript
import type React from "react";
|
|
import type { ChangeEventHandler } from "react";
|
|
|
|
|
|
export interface TextInputProps {
|
|
id: string;
|
|
className?: string;
|
|
inputClassName?: string;
|
|
labelClassName?: string;
|
|
placeholder?: string;
|
|
defaultValue?: string;
|
|
value?: string;
|
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export interface SelectInputProps {
|
|
label: React.ReactNode;
|
|
value?: string;
|
|
onChange?: (newValue: string) => void;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export interface OptionInputProps {
|
|
id?: string;
|
|
className?: string;
|
|
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;
|
|
}
|