From 4d5dda49ef572cf5cadf0bdfa2efac4d1770406f Mon Sep 17 00:00:00 2001 From: TitanKuzmich Date: Mon, 9 Dec 2024 14:37:07 +0300 Subject: [PATCH] feat(plasma-*): fix TextField layer type --- .../plasma-b2c/src/components/TextField/TextField.tsx | 10 +++++++--- .../plasma-web/src/components/TextField/TextField.tsx | 8 +++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/plasma-b2c/src/components/TextField/TextField.tsx b/packages/plasma-b2c/src/components/TextField/TextField.tsx index 1bd8b0e88e..67782e2999 100644 --- a/packages/plasma-b2c/src/components/TextField/TextField.tsx +++ b/packages/plasma-b2c/src/components/TextField/TextField.tsx @@ -91,8 +91,12 @@ type HintProps = hintContentLeft?: never; }; -export type CustomTextFieldProps = (TextFieldProps & - Pick< +export type CustomTextFieldProps = Omit & { + /** + * Подсказка для поля ввода. + */ + helperText?: ReactNode; +} & Pick< newHopeTextFieldProps, | 'enumerationType' | 'chips' @@ -106,7 +110,7 @@ export type CustomTextFieldProps = (TextFieldProps & | 'optional' | 'chipView' | 'chipValidator' - >) & + > & ClearProps & HintProps; diff --git a/packages/plasma-web/src/components/TextField/TextField.tsx b/packages/plasma-web/src/components/TextField/TextField.tsx index 6ccec9b78d..3080813fb9 100644 --- a/packages/plasma-web/src/components/TextField/TextField.tsx +++ b/packages/plasma-web/src/components/TextField/TextField.tsx @@ -91,7 +91,13 @@ type HintProps = hintContentLeft?: never; }; -type TextFieldProps = TextFieldPropsOld & ClearProps & HintProps; +type TextFieldProps = Omit & { + /** + * Подсказка для поля ввода. + */ + helperText?: ReactNode; +} & ClearProps & + HintProps; export type CustomTextFieldProps = TextFieldProps & Pick<