feat(SW-1386): buttons can now correctly be links
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Image from "@/components/Image"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
@@ -40,13 +41,34 @@ export default function FullWidthCampaign({ content }: FullWidthCampaignProps) {
|
||||
</Body>
|
||||
<div className={styles.buttons}>
|
||||
{node.has_primary_button ? (
|
||||
<Button intent="inverted" size="small" theme="base">
|
||||
{node.primary_button.title}
|
||||
<Button intent="inverted" size="small" theme="base" asChild>
|
||||
<Link
|
||||
href={node.primary_button.href}
|
||||
target={
|
||||
node.primary_button.openInNewTab ? "_blank" : undefined
|
||||
}
|
||||
color="none"
|
||||
>
|
||||
{node.primary_button.title}
|
||||
</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
{node.has_secondary_button ? (
|
||||
<Button intent="secondary" size="small" theme="primaryStrong">
|
||||
{node.secondary_button.title}
|
||||
<Button
|
||||
intent="secondary"
|
||||
size="small"
|
||||
theme="primaryStrong"
|
||||
asChild
|
||||
>
|
||||
<Link
|
||||
href={node.secondary_button.href}
|
||||
target={
|
||||
node.secondary_button.openInNewTab ? "_blank" : undefined
|
||||
}
|
||||
color="none"
|
||||
>
|
||||
{node.secondary_button.title}
|
||||
</Link>
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user