diff options
author | crupest <crupest@outlook.com> | 2023-09-21 23:49:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-09-21 23:49:12 +0800 |
commit | d477c7270c90b190ed82b13f48f39a05d83503d2 (patch) | |
tree | 572f74b2adc75247b9d1c9a8965e3de2559d4160 /FrontEnd/src/components/input/InputGroup.tsx | |
parent | a8a8385cd959e4d9d57b8a35381d2851049c07ff (diff) | |
download | timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.tar.gz timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.tar.bz2 timeline-d477c7270c90b190ed82b13f48f39a05d83503d2.zip |
Fix #1394.
Diffstat (limited to 'FrontEnd/src/components/input/InputGroup.tsx')
-rw-r--r-- | FrontEnd/src/components/input/InputGroup.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/FrontEnd/src/components/input/InputGroup.tsx b/FrontEnd/src/components/input/InputGroup.tsx index 47a43b38..be6cd577 100644 --- a/FrontEnd/src/components/input/InputGroup.tsx +++ b/FrontEnd/src/components/input/InputGroup.tsx @@ -26,16 +26,16 @@ import { useState, Ref, useId } from "react"; import classNames from "classnames"; -import { useC, Text, ThemeColor } from "../common"; +import { useC, I18nText, ThemeColor } from "../common"; import "./InputGroup.css"; export interface InputBase { key: string; - label: Text; - helper?: Text; + label: I18nText; + helper?: I18nText; disabled?: boolean; - error?: Text; + error?: I18nText; } export interface TextInput extends InputBase { @@ -51,7 +51,7 @@ export interface BoolInput extends InputBase { export interface SelectInputOption { value: string; - label: Text; + label: I18nText; icon?: string; } @@ -66,14 +66,14 @@ export type Input = TextInput | BoolInput | SelectInput; export type InputValue = Input["value"]; export type InputValueDict = Record<string, InputValue>; -export type InputErrorDict = Record<string, Text>; +export type InputErrorDict = Record<string, I18nText>; export type InputDisabledDict = Record<string, boolean>; export type InputDirtyDict = Record<string, boolean>; // use never so you don't have to cast everywhere export type InputConfirmValueDict = Record<string, never>; export type GeneralInputErrorDict = { - [key: string]: Text | null | undefined; + [key: string]: I18nText | null | undefined; }; type MakeInputInfo<I extends Input> = Omit<I, "value" | "error" | "disabled">; |