fix: update loyalty cards and join loyalty sidebar design
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
.icon,
|
||||
.icon * {
|
||||
fill: var(--Scandic-Brand-Burgundy);
|
||||
margin-bottom: var(--Spacing-x-half);
|
||||
.link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { EmailIcon, PhoneIcon } from "@/components/Icons"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
|
||||
import { getValueFromContactConfig } from "@/utils/contactConfig"
|
||||
|
||||
import styles from "./contactRow.module.css"
|
||||
@@ -27,15 +29,29 @@ export default async function ContactRow({ contact }: ContactRowProps) {
|
||||
Icon = PhoneIcon
|
||||
}
|
||||
|
||||
let openableLink = val
|
||||
if (contact.contact_field.includes("email")) {
|
||||
openableLink = `mailto:${val}`
|
||||
} else if (contact.contact_field.includes("phone")) {
|
||||
openableLink = `tel:${val}`
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
{Icon ? <Icon className={styles.icon} /> : null}
|
||||
<Body color="burgundy" textAlign="center" textTransform="bold">
|
||||
<Body color="burgundy" textTransform="bold">
|
||||
{contact.display_text}
|
||||
</Body>
|
||||
<Body color="burgundy" textAlign="center">
|
||||
<Link
|
||||
className={styles.link}
|
||||
href={openableLink}
|
||||
variant="myPage"
|
||||
color="burgundy"
|
||||
size="small"
|
||||
>
|
||||
{Icon ? <Icon width="20" height="20" color="burgundy" /> : null}
|
||||
{val}
|
||||
</Body>
|
||||
</Link>
|
||||
<Footnote color="burgundy">{contact.footnote}</Footnote>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,14 +4,12 @@
|
||||
|
||||
@media screen and (min-width: 1367px) {
|
||||
.contactContainer {
|
||||
align-items: center;
|
||||
border-top: 1px solid var(--UI-Grey-30);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Spacing-x5);
|
||||
gap: var(--Spacing-x2);
|
||||
justify-content: center;
|
||||
padding: var(--Spacing-x4) var(--Spacing-x2) var(--Spacing-x5);
|
||||
text-align: center;
|
||||
padding-top: var(--Spacing-x2);
|
||||
}
|
||||
|
||||
.contact {
|
||||
|
||||
@@ -12,9 +12,7 @@ export default async function Contact({ contactBlock }: ContactProps) {
|
||||
const { formatMessage } = await getIntl()
|
||||
return (
|
||||
<article className={styles.contactContainer}>
|
||||
<Subtitle textAlign="center">
|
||||
{formatMessage({ id: "Contact us" })}
|
||||
</Subtitle>
|
||||
<Subtitle>{formatMessage({ id: "Contact us" })}</Subtitle>
|
||||
<section className={styles.contact}>
|
||||
{contactBlock.map(({ contact, __typename }, i) => {
|
||||
switch (__typename) {
|
||||
|
||||
Reference in New Issue
Block a user