feat(BOOK-743): Replaced deprecated Button component
Approved-by: Bianca Widstam
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import NextLink from "next/link"
|
||||
|
||||
import { FakeButton } from "@scandic-hotels/design-system/FakeButton"
|
||||
import Image from "@scandic-hotels/design-system/Image"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import styles from "./promo.module.css"
|
||||
@@ -25,31 +26,29 @@ export default function Promo({
|
||||
image,
|
||||
}: PromoProps) {
|
||||
return (
|
||||
<Link color="none" href={href}>
|
||||
<article className={styles.promo}>
|
||||
{image && (
|
||||
<div className={styles.imageContainer}>
|
||||
<Image
|
||||
className={styles.image}
|
||||
src={image.src}
|
||||
alt={image.altText || image.altText_En}
|
||||
fill
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.overlay} />
|
||||
<div className={styles.content}>
|
||||
<Typography variant="Title/smLowCase">
|
||||
<p>{title}</p>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.text}>{text}</p>
|
||||
</Typography>
|
||||
<Button asChild intent="secondary" size="small" theme="primaryStrong">
|
||||
<span>{buttonText}</span>
|
||||
</Button>
|
||||
<NextLink className={styles.promo} href={href}>
|
||||
{image && (
|
||||
<div className={styles.imageContainer}>
|
||||
<Image
|
||||
className={styles.image}
|
||||
src={image.src}
|
||||
alt={image.altText || image.altText_En}
|
||||
fill
|
||||
/>
|
||||
</div>
|
||||
</article>
|
||||
</Link>
|
||||
)}
|
||||
<div className={styles.overlay} />
|
||||
<div className={styles.content}>
|
||||
<Typography variant="Title/smLowCase">
|
||||
<p>{title}</p>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.text}>{text}</p>
|
||||
</Typography>
|
||||
<FakeButton variant="Secondary" color="Inverted" size="sm">
|
||||
{buttonText}
|
||||
</FakeButton>
|
||||
</div>
|
||||
</NextLink>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
position: relative;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
Reference in New Issue
Block a user