fix font weight in footer
This commit is contained in:
@@ -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<TProps> = React.memo((props) => {
|
||||
@@ -13,22 +14,22 @@ export const ContactValueContainer:React.FC<TProps> = React.memo((props) => {
|
||||
switch(props.type) {
|
||||
case 'a':
|
||||
setJsxValue(
|
||||
<a href={props?.href} target='_blank' rel="noreferrer noopener" className='contact-data-href'>{props.value}</a>
|
||||
<a href={props?.href} target='_blank' rel="noreferrer noopener" className={`contact-data-href ${props.isBold? 'bold' : null}`}>{props.value}</a>
|
||||
)
|
||||
break;
|
||||
case 'email':
|
||||
setJsxValue(
|
||||
<a href={`mailto: ${props.href}`} className='contact-data-href'>{props.value}</a>
|
||||
<a href={`mailto: ${props.href}`} className={`contact-data-href ${props.isBold? 'bold' : null}`}>{props.value}</a>
|
||||
)
|
||||
break;
|
||||
case 'phone':
|
||||
setJsxValue(
|
||||
<a href={`tel:${props.href}`} className='contact-data-href'>{props.value}</a>
|
||||
<a href={`tel:${props.href}`} className={`contact-data-href ${props.isBold? 'bold' : null}`}>{props.value}</a>
|
||||
)
|
||||
break;
|
||||
case 'text':
|
||||
setJsxValue(
|
||||
<span className="contact-data-text">{props.value}</span>
|
||||
<span className={`contact-data-text ${props.isBold? 'bold' : null}`}>{props.value}</span>
|
||||
)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ type ContactValueType = {
|
||||
ru: string,
|
||||
en: string
|
||||
} | string
|
||||
href?: string
|
||||
href?: string,
|
||||
isBold?: boolean
|
||||
}
|
||||
|
||||
export const ContactContainer:React.FC<TProps> = React.memo((props) => {
|
||||
@@ -33,7 +34,7 @@ export const ContactContainer:React.FC<TProps> = React.memo((props) => {
|
||||
{
|
||||
props.href
|
||||
// ? <a href={`https://${props.href}`} target='_blank' rel="noreferrer noopener" className='contact-href'>{props.href}</a>
|
||||
? <a href={`${props.href}`} target='_blank' rel="noreferrer noopener" className='contact-href'>{props.href}</a>
|
||||
? <a href={`https://${props.href}`} target='_blank' rel="noreferrer noopener" className='contact-href'>{props.href}</a>
|
||||
: null
|
||||
}
|
||||
<div className="contact-data-container">
|
||||
@@ -47,20 +48,8 @@ export const ContactContainer:React.FC<TProps> = React.memo((props) => {
|
||||
: pair.value1.value[lang]
|
||||
}
|
||||
href={pair.value1?.href}
|
||||
/>
|
||||
{/* <div className="contact-data-value-container">
|
||||
<span className="contact-data-value">
|
||||
{
|
||||
typeof(pair.value1) === 'string'
|
||||
? pair.value1[0] === '+'
|
||||
? <a href={`tel:${pair.value1}`}>{pair.value1}</a>
|
||||
: pair.value1
|
||||
: pair.value1[lang][0] === '+'
|
||||
? <a href={`tel:${pair.value1[lang]}`}>{pair.value1[lang]}</a>
|
||||
: pair.value1[lang]
|
||||
}
|
||||
</span>
|
||||
</div> */}
|
||||
isBold={pair.value1?.isBold}
|
||||
/>
|
||||
{
|
||||
pair.value2?.type
|
||||
? <ContactValueContainer
|
||||
@@ -71,27 +60,10 @@ export const ContactContainer:React.FC<TProps> = React.memo((props) => {
|
||||
: pair.value2.value[lang]
|
||||
}
|
||||
href={pair.value2?.href}
|
||||
isBold={pair.value2?.isBold}
|
||||
/>
|
||||
: null
|
||||
}
|
||||
|
||||
{/* {
|
||||
pair?.value2
|
||||
? <div className="contact-data-value-container">
|
||||
<span className="contact-data-value">
|
||||
{
|
||||
typeof(pair.value2) === 'string'
|
||||
? pair.value2[0] === '+'
|
||||
? <a href={`tel:${pair.value2}`}>{pair.value2}</a>
|
||||
: pair.value2
|
||||
: pair.value2[lang][0] === '+'
|
||||
? <a href={`tel:${pair.value2[lang]}`}>{pair.value2[lang]}</a>
|
||||
: pair.value2[lang]
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
: null
|
||||
} */}
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
|
||||
}
|
||||
|
||||
.contact-data-text.bold,
|
||||
.contact-data-href.bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.contact-href,
|
||||
a {
|
||||
color: #FFFFFF;
|
||||
|
||||
@@ -12,16 +12,18 @@ export const Footer:React.FC = React.memo(() => {
|
||||
<div className="footer-content-contacts-first-container">
|
||||
<ContactContainer
|
||||
title={LangDict.contactTitle}
|
||||
href="https://graff.tech"
|
||||
href="graff.tech"
|
||||
pairData={[
|
||||
{
|
||||
value1: {
|
||||
type: "text",
|
||||
value: LangDict.contactRus
|
||||
value: LangDict.contactRus,
|
||||
isBold: true
|
||||
},
|
||||
value2: {
|
||||
type: 'text',
|
||||
value: LangDict.contactUae
|
||||
value: LangDict.contactUae,
|
||||
isBold: true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user