feat(BOOK-757): Replaced Biroscript component with Typography
Approved-by: Bianca Widstam
This commit is contained in:
@@ -4,7 +4,6 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import MembershipLevelIcon from "@/components/Levels/Icon"
|
import MembershipLevelIcon from "@/components/Levels/Icon"
|
||||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|
||||||
import SectionWrapper from "../SectionWrapper"
|
import SectionWrapper from "../SectionWrapper"
|
||||||
@@ -62,19 +61,17 @@ async function LevelCard({ level }: LevelCardProps) {
|
|||||||
return (
|
return (
|
||||||
<article className={styles.card}>
|
<article className={styles.card}>
|
||||||
<header>
|
<header>
|
||||||
<BiroScript
|
<Typography variant="Title/Decorative/md">
|
||||||
type="two"
|
<p className={styles.scriptedText}>
|
||||||
color="primaryLightOnSurfaceAccent"
|
{intl.formatMessage(
|
||||||
tilted="large"
|
{
|
||||||
>
|
id: "common.membershipLevelWithValue",
|
||||||
{intl.formatMessage(
|
defaultMessage: "Level {level}",
|
||||||
{
|
},
|
||||||
id: "common.membershipLevelWithValue",
|
{ level: level.user_facing_tag }
|
||||||
defaultMessage: "Level {level}",
|
)}
|
||||||
},
|
</p>
|
||||||
{ level: level.user_facing_tag }
|
</Typography>
|
||||||
)}
|
|
||||||
</BiroScript>
|
|
||||||
<MembershipLevelIcon level={level.level_id} color="red" />
|
<MembershipLevelIcon level={level.level_id} color="red" />
|
||||||
</header>
|
</header>
|
||||||
<Typography variant="Title/xs" className={styles.pointMsg}>
|
<Typography variant="Title/xs" className={styles.pointMsg}>
|
||||||
|
|||||||
@@ -32,6 +32,13 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedText {
|
||||||
|
color: var(--Icon-Accent);
|
||||||
|
transform: rotate(-11deg);
|
||||||
|
transform-origin: left;
|
||||||
|
margin-bottom: -4px;
|
||||||
|
}
|
||||||
|
|
||||||
.redText {
|
.redText {
|
||||||
color: var(--Base-Text-Accent);
|
color: var(--Base-Text-Accent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export default function RewardValue({ reward }: RewardValueProps) {
|
|||||||
icon="check_circle"
|
icon="check_circle"
|
||||||
size={32}
|
size={32}
|
||||||
color="Icon/Feedback/Success"
|
color="Icon/Feedback/Success"
|
||||||
|
className={styles.checkIcon}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,3 +17,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--UI-Grey-80);
|
color: var(--UI-Grey-80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.checkIcon {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,22 +1,19 @@
|
|||||||
import { useIntl } from "react-intl"
|
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"
|
import styles from "./yourLevel.module.css"
|
||||||
|
|
||||||
export default function YourLevel() {
|
export default function YourLevel() {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
return (
|
return (
|
||||||
<BiroScript
|
<Typography variant="Title/Decorative/md">
|
||||||
className={styles.script}
|
<span className={styles.script}>
|
||||||
color="peach80"
|
{intl.formatMessage({
|
||||||
type="two"
|
id: "overviewTable.yourLevel",
|
||||||
textAlign="center"
|
defaultMessage: "Your level",
|
||||||
>
|
})}
|
||||||
{intl.formatMessage({
|
</span>
|
||||||
id: "overviewTable.yourLevel",
|
</Typography>
|
||||||
defaultMessage: "Your level",
|
|
||||||
})}
|
|
||||||
</BiroScript>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
.script {
|
.script {
|
||||||
transform: rotate(-4deg);
|
transform: rotate(-4deg);
|
||||||
padding-bottom: var(--Space-x05);
|
padding-bottom: var(--Space-x05);
|
||||||
|
text-align: center;
|
||||||
|
color: var(--Text-Interactive-Secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 950px) {
|
@media screen and (min-width: 950px) {
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
import { isMembershipLevel } from "@scandic-hotels/common/utils/membershipLevels"
|
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 { 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"
|
import type { ScriptedRewardTextProps } from "@/types/components/myPages/myPage/accountPage"
|
||||||
|
|
||||||
@@ -46,8 +47,8 @@ export default function ScriptedRewardText({
|
|||||||
if (!label) return null
|
if (!label) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BiroScript type="two" color="red" tilted="small">
|
<Typography variant="Title/Decorative/md">
|
||||||
{label}
|
<span className={styles.scriptedText}>{label}</span>
|
||||||
</BiroScript>
|
</Typography>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.scriptedText {
|
||||||
|
transform: rotate(-3deg);
|
||||||
|
transform-origin: left;
|
||||||
|
color: var(--Text-Accent-Primary);
|
||||||
|
}
|
||||||
@@ -35,6 +35,8 @@
|
|||||||
gap: var(--Space-x1);
|
gap: var(--Space-x1);
|
||||||
padding: var(--Space-x4) var(--Space-x3);
|
padding: var(--Space-x4) var(--Space-x3);
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
color: var(--Base-Text-Inverted);
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContent {
|
.mainContent {
|
||||||
@@ -60,7 +62,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scriptedText {
|
.scriptedText {
|
||||||
display: inline-block;
|
transform: rotate(-3deg);
|
||||||
|
transform-origin: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
|
|||||||
import Image from "@scandic-hotels/design-system/Image"
|
import Image from "@scandic-hotels/design-system/Image"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
|
||||||
|
|
||||||
import styles from "./fullWidthCampaign.module.css"
|
import styles from "./fullWidthCampaign.module.css"
|
||||||
|
|
||||||
import type { FullWidthCampaign } from "@/types/trpc/routers/contentstack/startPage"
|
import type { FullWidthCampaign } from "@/types/trpc/routers/contentstack/startPage"
|
||||||
@@ -33,17 +31,17 @@ export default function FullWidthCampaign({
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
<div className={styles.scriptedText}>
|
<Typography variant="Title/Decorative/lg">
|
||||||
<BiroScript color="baseText" type="two" tilted="small">
|
<span className={styles.scriptedText}>
|
||||||
{content.scripted_top_title}
|
{content.scripted_top_title}
|
||||||
</BiroScript>
|
</span>
|
||||||
</div>
|
</Typography>
|
||||||
<div className={styles.mainContent}>
|
<div className={styles.mainContent}>
|
||||||
<Typography variant="Title/mdLowCase">
|
<Typography variant="Title/mdLowCase">
|
||||||
<Hx className={styles.bodyText}>{content.heading}</Hx>
|
<Hx>{content.heading}</Hx>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="Body/Lead text">
|
<Typography variant="Body/Lead text">
|
||||||
<p className={styles.bodyText}>{content.body_text}</p>
|
<p>{content.body_text}</p>
|
||||||
</Typography>
|
</Typography>
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
{content.has_primary_button ? (
|
{content.has_primary_button ? (
|
||||||
|
|||||||
@@ -62,6 +62,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Primary-Light-On-Surface-Text);
|
color: var(--Primary-Light-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Primary-Light-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themeTwo {
|
.themeTwo {
|
||||||
@@ -72,6 +76,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Secondary-Light-On-Surface-Text);
|
color: var(--Secondary-Light-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Secondary-Light-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themeThree {
|
.themeThree {
|
||||||
@@ -82,6 +90,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Tertiary-Light-On-Surface-Text);
|
color: var(--Tertiary-Light-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Tertiary-Light-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themePrimaryDark {
|
.themePrimaryDark {
|
||||||
@@ -92,6 +104,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Primary-Dark-On-Surface-Text);
|
color: var(--Primary-Dark-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Primary-Dark-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themePrimaryDim {
|
.themePrimaryDim {
|
||||||
@@ -102,6 +118,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Primary-Dim-On-Surface-Text);
|
color: var(--Primary-Dim-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Primary-Dim-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themePrimaryInverted {
|
.themePrimaryInverted {
|
||||||
@@ -112,6 +132,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Primary-Light-On-Surface-Text);
|
color: var(--Primary-Light-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Primary-Light-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themePrimaryStrong {
|
.themePrimaryStrong {
|
||||||
@@ -122,6 +146,10 @@
|
|||||||
.bodyText {
|
.bodyText {
|
||||||
color: var(--Primary-Strong-On-Surface-Text);
|
color: var(--Primary-Strong-On-Surface-Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Primary-Strong-On-Surface-Accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.themeImage {
|
.themeImage {
|
||||||
@@ -134,6 +162,10 @@
|
|||||||
.content {
|
.content {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptedTitle {
|
||||||
|
color: var(--Base-Text-Inverted);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scriptContainer {
|
.scriptContainer {
|
||||||
@@ -144,6 +176,8 @@
|
|||||||
.scriptedTitle {
|
.scriptedTitle {
|
||||||
padding: var(--Space-x1);
|
padding: var(--Space-x1);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
transform: rotate(-3deg);
|
||||||
|
transform-origin: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ import Image from "@scandic-hotels/design-system/Image"
|
|||||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||||
|
|
||||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
import { getButtonTheme } from "./utils"
|
||||||
|
|
||||||
import { getButtonTheme, getScriptFontColor } from "./utils"
|
|
||||||
import { cardVariants } from "./variants"
|
import { cardVariants } from "./variants"
|
||||||
|
|
||||||
import styles from "./card.module.css"
|
import styles from "./card.module.css"
|
||||||
@@ -29,7 +27,6 @@ export default function Card({
|
|||||||
height,
|
height,
|
||||||
}: CardProps) {
|
}: CardProps) {
|
||||||
const buttonTheme = getButtonTheme(theme)
|
const buttonTheme = getButtonTheme(theme)
|
||||||
const scriptFontColor = getScriptFontColor(theme)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<article
|
<article
|
||||||
@@ -59,14 +56,9 @@ export default function Card({
|
|||||||
<div className={styles.content}>
|
<div className={styles.content}>
|
||||||
{scriptedTopTitle && (
|
{scriptedTopTitle && (
|
||||||
<section className={styles.scriptContainer}>
|
<section className={styles.scriptContainer}>
|
||||||
<BiroScript
|
<Typography variant="Title/Decorative/md">
|
||||||
className={styles.scriptedTitle}
|
<span className={styles.scriptedTitle}>{scriptedTopTitle}</span>
|
||||||
type="two"
|
</Typography>
|
||||||
tilted="small"
|
|
||||||
color={scriptFontColor}
|
|
||||||
>
|
|
||||||
{scriptedTopTitle}
|
|
||||||
</BiroScript>
|
|
||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
<Typography variant="Title/smLowCase" className={styles.heading}>
|
<Typography variant="Title/smLowCase" className={styles.heading}>
|
||||||
|
|||||||
@@ -1,31 +1,6 @@
|
|||||||
import type { ButtonProps } from "@scandic-hotels/design-system/OldDSButton"
|
import type { ButtonProps } from "@scandic-hotels/design-system/OldDSButton"
|
||||||
import type { VariantProps } from "class-variance-authority"
|
|
||||||
|
|
||||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||||
import type { biroScriptVariants } from "@/components/TempDesignSystem/Text/BiroScript/variants"
|
|
||||||
|
|
||||||
export function getScriptFontColor(
|
|
||||||
theme: CardProps["theme"]
|
|
||||||
): VariantProps<typeof biroScriptVariants>["color"] {
|
|
||||||
switch (theme) {
|
|
||||||
case "one":
|
|
||||||
return "primaryLightOnSurfaceAccent"
|
|
||||||
case "two":
|
|
||||||
return "secondaryLightAccent"
|
|
||||||
case "three":
|
|
||||||
return "tertiaryLightAccent"
|
|
||||||
case "primaryDark":
|
|
||||||
return "pink"
|
|
||||||
case "primaryDim":
|
|
||||||
return "primaryDimAccent"
|
|
||||||
case "primaryInverted":
|
|
||||||
return "primaryLightOnSurfaceAccent"
|
|
||||||
case "primaryStrong":
|
|
||||||
return "primaryStrongAccent"
|
|
||||||
case "image":
|
|
||||||
return "baseText"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getButtonTheme(
|
export function getButtonTheme(
|
||||||
theme: CardProps["theme"]
|
theme: CardProps["theme"]
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
.text {
|
|
||||||
display: block;
|
|
||||||
font-family: var(--typography-Script-1-fontFamily);
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.one {
|
|
||||||
font-size: clamp(
|
|
||||||
var(--typography-Script-1-Mobile-fontSize),
|
|
||||||
1.3vw + 14px,
|
|
||||||
var(--typography-Script-1-Desktop-fontSize)
|
|
||||||
);
|
|
||||||
font-weight: var(--typography-Script-1-fontWeight);
|
|
||||||
letter-spacing: var(--typography-Script-1-letterSpacing);
|
|
||||||
line-height: var(--typography-Script-1-lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
.two {
|
|
||||||
font-size: clamp(
|
|
||||||
var(--typography-Script-2-Mobile-fontSize),
|
|
||||||
0.6vw + 15px,
|
|
||||||
var(--typography-Script-2-Desktop-fontSize)
|
|
||||||
);
|
|
||||||
font-weight: var(--typography-Script-2-fontWeight);
|
|
||||||
letter-spacing: var(--typography-Script-2-letterSpacing);
|
|
||||||
line-height: var(--typography-Script-2-lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tiltedExtraSmall {
|
|
||||||
transform: rotate(-2deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tiltedSmall {
|
|
||||||
transform: rotate(-3deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tiltedMedium {
|
|
||||||
transform: rotate(-4deg) translate(0px, -15px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tiltedLarge {
|
|
||||||
transform: rotate(-13deg) translate(0px, -15px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.left {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.black {
|
|
||||||
color: var(--Main-Grey-100);
|
|
||||||
}
|
|
||||||
|
|
||||||
.burgundy {
|
|
||||||
color: var(--Scandic-Brand-Burgundy);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pale {
|
|
||||||
color: var(--Scandic-Brand-Pale-Peach);
|
|
||||||
}
|
|
||||||
|
|
||||||
.peach80 {
|
|
||||||
color: var(--Base-Text-Medium-contrast);
|
|
||||||
}
|
|
||||||
|
|
||||||
.plosa {
|
|
||||||
color: var(--Primary-Light-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.red {
|
|
||||||
color: var(--Scandic-Brand-Scandic-Red);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pink {
|
|
||||||
color: var(--Primary-Dark-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.secondaryLightAccent {
|
|
||||||
color: var(--Secondary-Light-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tertiaryLightAccent {
|
|
||||||
color: var(--Tertiary-Light-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.primaryDimAccent {
|
|
||||||
color: var(--Primary-Dim-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.primaryStrongAccent {
|
|
||||||
color: var(--Primary-Strong-On-Surface-Accent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.baseText {
|
|
||||||
color: var(--Base-Text-Inverted);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import type { VariantProps } from "class-variance-authority"
|
|
||||||
|
|
||||||
import type { biroScriptVariants } from "./variants"
|
|
||||||
|
|
||||||
export interface BiroScriptProps
|
|
||||||
extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color">,
|
|
||||||
VariantProps<typeof biroScriptVariants> {
|
|
||||||
asChild?: boolean
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
import { Slot } from "@radix-ui/react-slot"
|
|
||||||
|
|
||||||
import { biroScriptVariants } from "./variants"
|
|
||||||
|
|
||||||
import type { BiroScriptProps } from "./biroScript"
|
|
||||||
|
|
||||||
export default function BiroScript({
|
|
||||||
asChild = false,
|
|
||||||
className,
|
|
||||||
color,
|
|
||||||
textAlign,
|
|
||||||
type,
|
|
||||||
tilted,
|
|
||||||
...props
|
|
||||||
}: BiroScriptProps) {
|
|
||||||
const Comp = asChild ? Slot : "span"
|
|
||||||
const classNames = biroScriptVariants({
|
|
||||||
className,
|
|
||||||
color,
|
|
||||||
textAlign,
|
|
||||||
type,
|
|
||||||
tilted,
|
|
||||||
})
|
|
||||||
return <Comp className={classNames} {...props} />
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
import { cva } from "class-variance-authority"
|
|
||||||
|
|
||||||
import styles from "./biroScript.module.css"
|
|
||||||
|
|
||||||
const config = {
|
|
||||||
variants: {
|
|
||||||
color: {
|
|
||||||
black: styles.black,
|
|
||||||
burgundy: styles.burgundy,
|
|
||||||
pale: styles.pale,
|
|
||||||
peach80: styles.peach80,
|
|
||||||
primaryLightOnSurfaceAccent: styles.plosa,
|
|
||||||
red: styles.red,
|
|
||||||
pink: styles.pink,
|
|
||||||
secondaryLightAccent: styles.secondaryLightAccent,
|
|
||||||
tertiaryLightAccent: styles.tertiaryLightAccent,
|
|
||||||
primaryDimAccent: styles.primaryDimAccent,
|
|
||||||
primaryStrongAccent: styles.primaryStrongAccent,
|
|
||||||
baseText: styles.baseText,
|
|
||||||
},
|
|
||||||
textAlign: {
|
|
||||||
center: styles.center,
|
|
||||||
left: styles.left,
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
one: styles.one,
|
|
||||||
two: styles.two,
|
|
||||||
},
|
|
||||||
tilted: {
|
|
||||||
extraSmall: styles.tiltedExtraSmall,
|
|
||||||
small: styles.tiltedSmall,
|
|
||||||
medium: styles.tiltedMedium,
|
|
||||||
large: styles.tiltedLarge,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
defaultVariants: {
|
|
||||||
type: "one",
|
|
||||||
},
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export const biroScriptVariants = cva(styles.text, config)
|
|
||||||
Reference in New Issue
Block a user