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