mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-21 14:06:58 +01:00
* feat: update prettier configuration for print width * chore: apply code formatting to entire repository * fix: remove build files * fix: format issue --------- Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
21 lines
592 B
TypeScript
21 lines
592 B
TypeScript
"use client";
|
|
|
|
import { TextInput } from "@mantine/core";
|
|
|
|
import type { CommonWidgetInputProps } from "./common";
|
|
import { useWidgetInputTranslation } from "./common";
|
|
import { useFormContext } from "./form";
|
|
|
|
export const WidgetTextInput = ({ property, kind, options }: CommonWidgetInputProps<"text">) => {
|
|
const t = useWidgetInputTranslation(kind, property);
|
|
const form = useFormContext();
|
|
|
|
return (
|
|
<TextInput
|
|
label={t("label")}
|
|
description={options.withDescription ? t("description") : undefined}
|
|
{...form.getInputProps(`options.${property}`)}
|
|
/>
|
|
);
|
|
};
|