feat(BOOK-743): Replaced deprecated Button component

Approved-by: Bianca Widstam
This commit is contained in:
Erik Tiekstra
2026-01-21 09:38:38 +00:00
parent f834433d4d
commit 8e08af718c
77 changed files with 575 additions and 2233 deletions

View File

@@ -74,7 +74,8 @@ export function InfoCard({
size="sm"
href={primaryButton.href}
onClick={primaryButton.onClick}
scroll={primaryButton.scrollOnClick ?? false}
scroll={primaryButton.scrollOnClick}
isExternal={primaryButton.isExternal}
{...buttonProps.primaryButton}
>
{primaryButton.text}
@@ -85,7 +86,8 @@ export function InfoCard({
size="sm"
href={secondaryButton.href}
onClick={secondaryButton.onClick}
scroll={secondaryButton.scrollOnClick ?? false}
scroll={secondaryButton.scrollOnClick}
isExternal={secondaryButton.isExternal}
{...buttonProps.secondaryButton}
>
{secondaryButton.text}

View File

@@ -1,6 +1,6 @@
import type { VariantProps } from "class-variance-authority"
import { MouseEventHandler } from "react"
import { ButtonLinkProps } from "../ButtonLink"
import type { infoCardVariants } from "./variants"
export type InfoCardBackgroundImage = {
@@ -10,12 +10,13 @@ export type InfoCardBackgroundImage = {
dimensions?: { width: number; height: number; aspectRatio?: number }
}
export type InfoCardButton = {
href: string
export type InfoCardButton = Pick<
ButtonLinkProps,
"href" | "onClick" | "trailingIconName" | "leadingIconName" | "isExternal"
> & {
text: string
openInNewTab?: boolean
scrollOnClick?: boolean
onClick?: MouseEventHandler<HTMLAnchorElement>
}
export interface InfoCardProps