UI: foward input variant to textInput

This commit is contained in:
Johannes Kirschbauer
2025-01-03 16:36:59 +01:00
parent 48b673aace
commit 47e3c38a12

View File

@@ -1,5 +1,10 @@
import { splitProps, type JSX } from "solid-js";
import { InputBase, InputError, InputLabel } from "@/src/components/inputBase";
import {
InputBase,
InputError,
InputLabel,
InputVariant,
} from "@/src/components/inputBase";
import { Typography } from "@/src/components/Typography";
import { FieldLayout } from "./layout";
@@ -12,10 +17,11 @@ interface TextInputProps {
value: string;
inputProps?: JSX.InputHTMLAttributes<HTMLInputElement>;
placeholder?: string;
variant?: InputVariant;
// Passed to label
label: JSX.Element;
help?: string;
// Passed to layouad
// Passed to layout
class?: string;
}
@@ -35,6 +41,7 @@ export function TextInput(props: TextInputProps) {
}
field={
<InputBase
variant={props.variant}
error={!!props.error}
required={props.required}
disabled={props.disabled}