From ba09bc9c5bcb61291a9d752f4071be94458a4b23 Mon Sep 17 00:00:00 2001 From: DmitriyB Date: Thu, 28 Jul 2022 16:40:46 +0500 Subject: [PATCH] fix font weight in footer --- .../footer/contactValueContainer.tsx | 11 ++--- src/components/footer/contactsContainer.tsx | 40 +++---------------- src/components/footer/footer.css | 5 +++ src/components/footer/footer.tsx | 8 ++-- 4 files changed, 22 insertions(+), 42 deletions(-) diff --git a/src/components/footer/contactValueContainer.tsx b/src/components/footer/contactValueContainer.tsx index f21505e..746a7c5 100644 --- a/src/components/footer/contactValueContainer.tsx +++ b/src/components/footer/contactValueContainer.tsx @@ -3,7 +3,8 @@ import React, { useEffect, useState } from "react"; type TProps = { type: 'a' | 'email' | 'phone' | 'text' value: string - href?: string + href?: string, + isBold?: boolean } export const ContactValueContainer:React.FC = React.memo((props) => { @@ -13,22 +14,22 @@ export const ContactValueContainer:React.FC = React.memo((props) => { switch(props.type) { case 'a': setJsxValue( - {props.value} + {props.value} ) break; case 'email': setJsxValue( - {props.value} + {props.value} ) break; case 'phone': setJsxValue( - {props.value} + {props.value} ) break; case 'text': setJsxValue( - {props.value} + {props.value} ) break; } diff --git a/src/components/footer/contactsContainer.tsx b/src/components/footer/contactsContainer.tsx index 8a65dae..7253da1 100644 --- a/src/components/footer/contactsContainer.tsx +++ b/src/components/footer/contactsContainer.tsx @@ -20,7 +20,8 @@ type ContactValueType = { ru: string, en: string } | string - href?: string + href?: string, + isBold?: boolean } export const ContactContainer:React.FC = React.memo((props) => { @@ -33,7 +34,7 @@ export const ContactContainer:React.FC = React.memo((props) => { { props.href // ? {props.href} - ? {props.href} + ? {props.href} : null }
@@ -47,20 +48,8 @@ export const ContactContainer:React.FC = React.memo((props) => { : pair.value1.value[lang] } href={pair.value1?.href} - /> - {/*
- - { - typeof(pair.value1) === 'string' - ? pair.value1[0] === '+' - ? {pair.value1} - : pair.value1 - : pair.value1[lang][0] === '+' - ? {pair.value1[lang]} - : pair.value1[lang] - } - -
*/} + isBold={pair.value1?.isBold} + /> { pair.value2?.type ? = React.memo((props) => { : pair.value2.value[lang] } href={pair.value2?.href} + isBold={pair.value2?.isBold} /> : null } - - {/* { - pair?.value2 - ?
- - { - typeof(pair.value2) === 'string' - ? pair.value2[0] === '+' - ? {pair.value2} - : pair.value2 - : pair.value2[lang][0] === '+' - ? {pair.value2[lang]} - : pair.value2[lang] - } - -
- : null - } */}
})} diff --git a/src/components/footer/footer.css b/src/components/footer/footer.css index 9e08bb9..9d766dd 100644 --- a/src/components/footer/footer.css +++ b/src/components/footer/footer.css @@ -67,6 +67,11 @@ } +.contact-data-text.bold, +.contact-data-href.bold { + font-weight: 600; +} + .contact-href, a { color: #FFFFFF; diff --git a/src/components/footer/footer.tsx b/src/components/footer/footer.tsx index cb14b41..ddbc89a 100644 --- a/src/components/footer/footer.tsx +++ b/src/components/footer/footer.tsx @@ -12,16 +12,18 @@ export const Footer:React.FC = React.memo(() => {