feat(BOOK-743): Replaced deprecated Button component
Approved-by: Bianca Widstam
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user