feat(BOOK-757): Replaced Biroscript component with Typography

Approved-by: Bianca Widstam
This commit is contained in:
Erik Tiekstra
2026-01-20 12:37:05 +00:00
parent 9e373ed600
commit 510f25a812
17 changed files with 92 additions and 250 deletions

View File

@@ -4,7 +4,6 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
import { serverClient } from "@/lib/trpc/server"
import MembershipLevelIcon from "@/components/Levels/Icon"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import { getIntl } from "@/i18n"
import SectionWrapper from "../SectionWrapper"
@@ -62,19 +61,17 @@ async function LevelCard({ level }: LevelCardProps) {
return (
<article className={styles.card}>
<header>
<BiroScript
type="two"
color="primaryLightOnSurfaceAccent"
tilted="large"
>
{intl.formatMessage(
{
id: "common.membershipLevelWithValue",
defaultMessage: "Level {level}",
},
{ level: level.user_facing_tag }
)}
</BiroScript>
<Typography variant="Title/Decorative/md">
<p className={styles.scriptedText}>
{intl.formatMessage(
{
id: "common.membershipLevelWithValue",
defaultMessage: "Level {level}",
},
{ level: level.user_facing_tag }
)}
</p>
</Typography>
<MembershipLevelIcon level={level.level_id} color="red" />
</header>
<Typography variant="Title/xs" className={styles.pointMsg}>

View File

@@ -32,6 +32,13 @@
justify-content: center;
}
.scriptedText {
color: var(--Icon-Accent);
transform: rotate(-11deg);
transform-origin: left;
margin-bottom: -4px;
}
.redText {
color: var(--Base-Text-Accent);
}

View File

@@ -16,6 +16,7 @@ export default function RewardValue({ reward }: RewardValueProps) {
icon="check_circle"
size={32}
color="Icon/Feedback/Success"
className={styles.checkIcon}
/>
)
}

View File

@@ -17,3 +17,7 @@
text-align: center;
color: var(--UI-Grey-80);
}
.checkIcon {
display: inline-flex;
}

View File

@@ -1,22 +1,19 @@
import { useIntl } from "react-intl"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import { Typography } from "@scandic-hotels/design-system/Typography"
import styles from "./yourLevel.module.css"
export default function YourLevel() {
const intl = useIntl()
return (
<BiroScript
className={styles.script}
color="peach80"
type="two"
textAlign="center"
>
{intl.formatMessage({
id: "overviewTable.yourLevel",
defaultMessage: "Your level",
})}
</BiroScript>
<Typography variant="Title/Decorative/md">
<span className={styles.script}>
{intl.formatMessage({
id: "overviewTable.yourLevel",
defaultMessage: "Your level",
})}
</span>
</Typography>
)
}

View File

@@ -1,6 +1,8 @@
.script {
transform: rotate(-4deg);
padding-bottom: var(--Space-x05);
text-align: center;
color: var(--Text-Interactive-Secondary);
}
@media screen and (min-width: 950px) {

View File

@@ -1,10 +1,11 @@
import { useIntl } from "react-intl"
import { isMembershipLevel } from "@scandic-hotels/common/utils/membershipLevels"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { TIER_TO_FRIEND_MAP } from "@/constants/membershipLevels"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import styles from "./scriptedRewardText.module.css"
import type { ScriptedRewardTextProps } from "@/types/components/myPages/myPage/accountPage"
@@ -46,8 +47,8 @@ export default function ScriptedRewardText({
if (!label) return null
return (
<BiroScript type="two" color="red" tilted="small">
{label}
</BiroScript>
<Typography variant="Title/Decorative/md">
<span className={styles.scriptedText}>{label}</span>
</Typography>
)
}

View File

@@ -0,0 +1,5 @@
.scriptedText {
transform: rotate(-3deg);
transform-origin: left;
color: var(--Text-Accent-Primary);
}

View File

@@ -35,6 +35,8 @@
gap: var(--Space-x1);
padding: var(--Space-x4) var(--Space-x3);
z-index: 2;
color: var(--Base-Text-Inverted);
text-align: center;
}
.mainContent {
@@ -60,7 +62,8 @@
}
.scriptedText {
display: inline-block;
transform: rotate(-3deg);
transform-origin: left;
}
@media screen and (max-width: 767px) {

View File

@@ -2,8 +2,6 @@ import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
import Image from "@scandic-hotels/design-system/Image"
import { Typography } from "@scandic-hotels/design-system/Typography"
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import styles from "./fullWidthCampaign.module.css"
import type { FullWidthCampaign } from "@/types/trpc/routers/contentstack/startPage"
@@ -33,17 +31,17 @@ export default function FullWidthCampaign({
/>
) : null}
<div className={styles.content}>
<div className={styles.scriptedText}>
<BiroScript color="baseText" type="two" tilted="small">
<Typography variant="Title/Decorative/lg">
<span className={styles.scriptedText}>
{content.scripted_top_title}
</BiroScript>
</div>
</span>
</Typography>
<div className={styles.mainContent}>
<Typography variant="Title/mdLowCase">
<Hx className={styles.bodyText}>{content.heading}</Hx>
<Hx>{content.heading}</Hx>
</Typography>
<Typography variant="Body/Lead text">
<p className={styles.bodyText}>{content.body_text}</p>
<p>{content.body_text}</p>
</Typography>
<div className={styles.buttons}>
{content.has_primary_button ? (