From ad4dcaeda4bce3f41652ad12fa0c2ac434d31a46 Mon Sep 17 00:00:00 2001 From: Sergei Gavrilov Date: Tue, 17 Dec 2024 23:51:05 +0300 Subject: [PATCH 1/2] contacts-page refactored: div element-box removed, css fixed --- .../components/contact-input/index.tsx | 32 +++++++++---------- .../contact-input/styles.module.css | 29 ++--------------- .../contacts-form/styles.module.css | 5 ++- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/src/pages/contacts/components/contact-input/index.tsx b/src/pages/contacts/components/contact-input/index.tsx index e405d36f..e35019d0 100644 --- a/src/pages/contacts/components/contact-input/index.tsx +++ b/src/pages/contacts/components/contact-input/index.tsx @@ -46,23 +46,21 @@ export const ContactInput = ({ return (
-
- - -
+ + {isEditAllowed && ( <>
Date: Wed, 25 Dec 2024 13:12:44 +0300 Subject: [PATCH 2/2] add grid, fix mobil view --- .../components/contact-input/index.tsx | 6 +- .../contact-input/styles.module.css | 55 +++++++++++++------ .../contacts-form/styles.module.css | 6 +- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/pages/contacts/components/contact-input/index.tsx b/src/pages/contacts/components/contact-input/index.tsx index e35019d0..4398329b 100644 --- a/src/pages/contacts/components/contact-input/index.tsx +++ b/src/pages/contacts/components/contact-input/index.tsx @@ -1,7 +1,7 @@ import { DetailedHTMLProps, InputHTMLAttributes, MouseEvent } from 'react'; import cn from 'classnames'; -import { Icon, Typography } from 'shared/ui'; +import { GradientDivider, Icon, Typography } from 'shared/ui'; import styles from './styles.module.css'; @@ -35,7 +35,7 @@ export const ContactInput = ({ [styles.input_mode_edit]: isEditable, [styles.input_mode_link]: !isEditable, }); - const errorTextStyles = cn({ + const errorTextStyles = cn(styles.edit_box_error, { [styles.edit_box_hidden]: !isEditable, }); @@ -51,6 +51,7 @@ export const ContactInput = ({ color={'primary-additional'} variant={'title'} content={label} + extraClass={styles.label} /> + {isEditAllowed && ( <>