feat(WEB-304): remaning UI from design system primitives
This commit is contained in:
@@ -1,21 +1,5 @@
|
||||
.container {
|
||||
display: grid;
|
||||
text-align: center;
|
||||
gap: 0.4rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: var(--typography-Body-Regular-fontFamily);
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-family: var(--typography-Body-Regular-fontFamily);
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
.icon,
|
||||
.icon * {
|
||||
fill: var(--Scandic-Brand-Burgundy);
|
||||
margin-bottom: var(--Spacing-x-half);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { EmailIcon, PhoneIcon } from "@/components/Icons"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import { getValueFromContactConfig } from "@/utils/contactConfig"
|
||||
|
||||
import styles from "./contactRow.module.css"
|
||||
@@ -7,7 +9,7 @@ import styles from "./contactRow.module.css"
|
||||
import type { ContactRowProps } from "@/types/components/loyalty/sidebar"
|
||||
|
||||
export default async function ContactRow({ contact }: ContactRowProps) {
|
||||
const data = await serverClient().contentstack.config.contact()
|
||||
const data = await serverClient().contentstack.base.contact()
|
||||
|
||||
const val = getValueFromContactConfig(contact.contact_field, data)
|
||||
|
||||
@@ -15,10 +17,22 @@ export default async function ContactRow({ contact }: ContactRowProps) {
|
||||
return null
|
||||
}
|
||||
|
||||
let Icon = null
|
||||
if (contact.contact_field.includes("email")) {
|
||||
Icon = EmailIcon
|
||||
} else if (contact.contact_field.includes("phone")) {
|
||||
Icon = PhoneIcon
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<h4 className={styles.title}>{contact.display_text}</h4>
|
||||
<p className={styles.value}>{val}</p>
|
||||
<div>
|
||||
{Icon ? <Icon className={styles.icon} /> : null}
|
||||
<Body color="burgundy" textAlign="center" textTransform="bold">
|
||||
{contact.display_text}
|
||||
</Body>
|
||||
<Body color="burgundy" textAlign="center">
|
||||
{val}
|
||||
</Body>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user