feat(SW-543): get footnote from contact config

This commit is contained in:
Fredrik Thorsson
2024-12-20 14:21:38 +01:00
parent 4c99bb2b18
commit 584bcccb77
2 changed files with 24 additions and 16 deletions

View File

@@ -1,3 +1,9 @@
.wrapper {
display: flex;
flex-direction: column;
gap: var(--Spacing-x-half);
}
.link {
display: flex;
align-items: center;

View File

@@ -17,7 +17,7 @@ export default async function ContactRow({ contact }: ContactRowProps) {
}
const val = getValueFromContactConfig(contact.contact_field, data)
const test = getValueFromContactConfig(contact.selectTest, data)
const footnote = getValueFromContactConfig(contact.selectTest, data)
if (!val) {
return null
@@ -38,21 +38,23 @@ export default async function ContactRow({ contact }: ContactRowProps) {
}
return (
<div>
<Body color="burgundy" textTransform="bold">
{contact.display_text}
</Body>
<Link
className={styles.link}
href={openableLink}
variant="underscored"
color="burgundy"
size="small"
>
{Icon ? <Icon width="20" height="20" color="burgundy" /> : null}
{val}
</Link>
<Footnote color="burgundy">{test}</Footnote>
<div className={styles.wrapper}>
<div>
<Body color="burgundy" textTransform="bold">
{contact.display_text}
</Body>
<Link
className={styles.link}
href={openableLink}
variant="underscored"
color="burgundy"
size="small"
>
{Icon ? <Icon width="20" height="20" color="burgundy" /> : null}
{val}
</Link>
</div>
{footnote && <Footnote color="burgundy">{footnote}</Footnote>}
</div>
)
}