From a23430676432cef11980c44cbef8d9fe3b33feaf Mon Sep 17 00:00:00 2001 From: Viktor Riabkov Date: Tue, 9 Apr 2024 22:26:29 +0800 Subject: [PATCH] Update imports from TextField to ProxyTextField component --- .../activity/ui/AdditionalTextResponse.tsx | 8 +++---- src/shared/ui/BaseTextInput/index.tsx | 23 +++++++++++++++++++ src/shared/ui/Items/Text/index.tsx | 8 +++---- src/shared/ui/index.ts | 1 + 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 src/shared/ui/BaseTextInput/index.tsx diff --git a/src/entities/activity/ui/AdditionalTextResponse.tsx b/src/entities/activity/ui/AdditionalTextResponse.tsx index 34f7bb1e6..686a16bde 100644 --- a/src/entities/activity/ui/AdditionalTextResponse.tsx +++ b/src/entities/activity/ui/AdditionalTextResponse.tsx @@ -1,13 +1,13 @@ -import TextField from '@mui/material/TextField'; +import { BaseTextInput } from '~/shared/ui'; -type AdditionalTextResponseProps = { +type Props = { value: string; onValueChange: (value: string) => void; }; -export const AdditionalTextResponse = ({ value, onValueChange }: AdditionalTextResponseProps) => { +export const AdditionalTextResponse = ({ value, onValueChange }: Props) => { return ( - onValueChange(e.target.value)} + * disabled={false} + * /> + * ) + */ + +function BaseTextInput(props: TextFieldProps) { + return ; +} + +export default BaseTextInput; diff --git a/src/shared/ui/Items/Text/index.tsx b/src/shared/ui/Items/Text/index.tsx index d5ad0e510..ac0b44fc0 100644 --- a/src/shared/ui/Items/Text/index.tsx +++ b/src/shared/ui/Items/Text/index.tsx @@ -1,14 +1,14 @@ -import TextField from '@mui/material/TextField'; +import { BaseTextInput } from '~/shared/ui'; -type TextItemProps = { +type Props = { value: string | undefined; onValueChange: (value: string) => void; disabled: boolean; }; -export const TextItem = ({ value = '', onValueChange, disabled }: TextItemProps) => { +export const TextItem = ({ value = '', onValueChange, disabled }: Props) => { return ( -