From 811e14fd4c99a31505908921a0aefa50fb28a943 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 4 Jan 2022 17:36:05 +0700 Subject: [PATCH] fixed inputs --- src/components/boris/BorisUIDemo/index.tsx | 88 ++-- .../LocalCommentFormTextarea/index.tsx | 3 +- .../editors/EditorButtons/index.tsx | 19 +- src/components/editors/TextEditor/index.tsx | 4 +- .../input/Button/styles.module.scss | 2 +- .../input/ButtonGroup/styles.module.scss | 4 +- src/components/input/Info/style.scss | 3 +- src/components/input/InputText/index.tsx | 89 ++-- .../input/InputText/styles.module.scss | 39 ++ src/components/input/InputWrapper/index.tsx | 26 ++ .../input/InputWrapper/styles.module.scss | 62 +++ src/components/input/Textarea/index.tsx | 96 ++--- .../input/Textarea/styles.module.scss | 12 + src/components/main/Header/index.tsx | 2 +- .../main/UserButton/styles.module.scss | 2 +- src/components/profile/MessageForm/index.tsx | 1 - .../profile/MessageForm/styles.module.scss | 2 +- src/containers/flow/FlowStamp/index.tsx | 2 +- .../flow/FlowStamp/styles.module.scss | 8 - src/hooks/dom/useFocusEvent.ts | 4 +- src/hooks/search/useSearch.ts | 1 - src/pages/index.tsx | 1 - src/redux/types.ts | 10 +- src/styles/_colors.scss | 3 - src/styles/_fonts.scss | 41 ++ src/styles/_inputs.scss | 11 + src/styles/_mixins.scss | 246 +++++++++++ src/styles/common/inputs.module.scss | 390 ------------------ src/styles/variables.scss | 296 +------------ 29 files changed, 566 insertions(+), 901 deletions(-) create mode 100644 src/components/input/InputText/styles.module.scss create mode 100644 src/components/input/InputWrapper/index.tsx create mode 100644 src/components/input/InputWrapper/styles.module.scss create mode 100644 src/components/input/Textarea/styles.module.scss create mode 100644 src/styles/_fonts.scss create mode 100644 src/styles/_inputs.scss create mode 100644 src/styles/_mixins.scss delete mode 100644 src/styles/common/inputs.module.scss diff --git a/src/components/boris/BorisUIDemo/index.tsx b/src/components/boris/BorisUIDemo/index.tsx index 4a958272..d8b3a0db 100644 --- a/src/components/boris/BorisUIDemo/index.tsx +++ b/src/components/boris/BorisUIDemo/index.tsx @@ -1,4 +1,4 @@ -import React, { FC } from 'react'; +import React, { FC, useState } from 'react'; import { Card } from '~/components/containers/Card'; import styles from './styles.module.scss'; import markdown from '~/styles/common/markdown.module.scss'; @@ -8,53 +8,59 @@ import { InputText } from '~/components/input/InputText'; interface IProps {} -const BorisUIDemo: FC = () => ( - -
-

UI

-

- Простая демонстрация элементов интерфейса. Используется, в основном, как подсказка при - разработке -

+const BorisUIDemo: FC = () => { + const [text, setText] = useState(''); -

Инпуты

+ return ( + +
+

UI

+

+ Простая демонстрация элементов интерфейса. Используется, в основном, как подсказка при + разработке +

-
- - - - +

Инпуты

-

Кнопки

+
+ + + + + +
-

Цвета

+

Кнопки

- - - - - - - +

Цвета

-

Размеры

+ + + + + + + - - - - - - - +

Размеры

-

Варианты

- - - - - -
-
-); + + + + + + + + +

Варианты

+ + + + + +
+
+ ); +}; export { BorisUIDemo }; diff --git a/src/components/comment/LocalCommentFormTextarea/index.tsx b/src/components/comment/LocalCommentFormTextarea/index.tsx index 36234743..1dcc9640 100644 --- a/src/components/comment/LocalCommentFormTextarea/index.tsx +++ b/src/components/comment/LocalCommentFormTextarea/index.tsx @@ -27,8 +27,7 @@ const LocalCommentFormTextarea: FC = ({ setRef }) => { onKeyDown={onKeyDown} disabled={isSubmitting} placeholder={placeholder} - minRows={2} - setRef={setRef} + ref={setRef} /> ); }; diff --git a/src/components/editors/EditorButtons/index.tsx b/src/components/editors/EditorButtons/index.tsx index b0679907..d73c282d 100644 --- a/src/components/editors/EditorButtons/index.tsx +++ b/src/components/editors/EditorButtons/index.tsx @@ -5,6 +5,7 @@ import { InputText } from '~/components/input/InputText'; import { Button } from '~/components/input/Button'; import { Padder } from '~/components/containers/Padder'; import { useNodeFormContext } from '~/hooks/node/useNodeFormFormik'; +import { Filler } from '~/components/containers/Filler'; const EditorButtons: FC = () => { const { values, handleChange, isSubmitting } = useNodeFormContext(); @@ -14,14 +15,16 @@ const EditorButtons: FC = () => { - + + +