Merged in feat/section-header-link (pull request #314)
Feat(WEB-359): Update section link for mobile Approved-by: Chuma Mcphoy (We Ahead) Approved-by: Arvid Norlin
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
import Card from "@/components/TempDesignSystem/Card"
|
import Card from "@/components/TempDesignSystem/Card"
|
||||||
import Grids from "@/components/TempDesignSystem/Grids"
|
import Grids from "@/components/TempDesignSystem/Grids"
|
||||||
import LoyaltyCard from "@/components/TempDesignSystem/LoyaltyCard"
|
import LoyaltyCard from "@/components/TempDesignSystem/LoyaltyCard"
|
||||||
@@ -13,7 +13,7 @@ export default function CardsGrid({
|
|||||||
}: CardsGridProps) {
|
}: CardsGridProps) {
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header
|
<SectionHeader
|
||||||
title={cards_grid.title}
|
title={cards_grid.title}
|
||||||
subtitle={cards_grid.preamble}
|
subtitle={cards_grid.preamble}
|
||||||
topTitle={firstItem}
|
topTitle={firstItem}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import { serverClient } from "@/lib/trpc/server"
|
|||||||
|
|
||||||
import { auth } from "@/auth"
|
import { auth } from "@/auth"
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ export default function DynamicContent({
|
|||||||
<Subtitle>{dynamicContent.subtitle}</Subtitle>
|
<Subtitle>{dynamicContent.subtitle}</Subtitle>
|
||||||
</div>
|
</div>
|
||||||
) : displayHeader ? (
|
) : displayHeader ? (
|
||||||
<Header
|
<SectionHeader
|
||||||
link={dynamicContent.link}
|
link={dynamicContent.link}
|
||||||
subtitle={dynamicContent.subtitle}
|
subtitle={dynamicContent.subtitle}
|
||||||
title={dynamicContent.title}
|
title={dynamicContent.title}
|
||||||
@@ -64,6 +65,9 @@ export default function DynamicContent({
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
<DynamicComponentBlock component={dynamicContent.component} />
|
<DynamicComponentBlock component={dynamicContent.component} />
|
||||||
|
{displayHeader && (
|
||||||
|
<SectionLink link={dynamicContent.link} variant="mobile" />
|
||||||
|
)}
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import Grids from "@/components/TempDesignSystem/Grids"
|
import Grids from "@/components/TempDesignSystem/Grids"
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
||||||
@@ -47,7 +48,7 @@ export default async function CurrentBenefitsBlock({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header title={title} link={link} subtitle={subtitle} />
|
<SectionHeader title={title} link={link} subtitle={subtitle} />
|
||||||
<Grids.Scrollable>
|
<Grids.Scrollable>
|
||||||
{currentLevel.benefits.map((benefit, idx) => (
|
{currentLevel.benefits.map((benefit, idx) => (
|
||||||
<Link className={styles.card} href="#" key={`${currentLevel}-${idx}`}>
|
<Link className={styles.card} href="#" key={`${currentLevel}-${idx}`}>
|
||||||
@@ -64,6 +65,7 @@ export default async function CurrentBenefitsBlock({
|
|||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</Grids.Scrollable>
|
</Grids.Scrollable>
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import { MembershipLevelEnum } from "@/constants/membershipLevels"
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import Chip from "@/components/TempDesignSystem/Chip"
|
import Chip from "@/components/TempDesignSystem/Chip"
|
||||||
import Grids from "@/components/TempDesignSystem/Grids"
|
import Grids from "@/components/TempDesignSystem/Grids"
|
||||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
||||||
@@ -39,7 +40,7 @@ export default async function NextLevelBenefitsBlock({
|
|||||||
// TODO: how to handle different count of unlockable benefits?
|
// TODO: how to handle different count of unlockable benefits?
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header title={title} subtitle={subtitle} link={link} />
|
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
||||||
<Grids.Stackable>
|
<Grids.Stackable>
|
||||||
{nextLevel.benefits.map((benefit) => (
|
{nextLevel.benefits.map((benefit) => (
|
||||||
<article key={benefit.title} className={styles.card}>
|
<article key={benefit.title} className={styles.card}>
|
||||||
@@ -63,6 +64,7 @@ export default async function NextLevelBenefitsBlock({
|
|||||||
</article>
|
</article>
|
||||||
))}
|
))}
|
||||||
</Grids.Stackable>
|
</Grids.Stackable>
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import Divider from "@/components/TempDesignSystem/Divider"
|
import Divider from "@/components/TempDesignSystem/Divider"
|
||||||
|
|
||||||
import Friend from "./Friend"
|
import Friend from "./Friend"
|
||||||
@@ -24,12 +25,13 @@ export default async function Overview({
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header link={link} subtitle={subtitle} title={title} topTitle />
|
<SectionHeader link={link} subtitle={subtitle} title={title} topTitle />
|
||||||
<section className={styles.overview}>
|
<section className={styles.overview}>
|
||||||
<Friend user={user} />
|
<Friend user={user} />
|
||||||
<Divider className={styles.divider} color="peach" />
|
<Divider className={styles.divider} color="peach" />
|
||||||
<Stats user={user} lang={lang} />
|
<Stats user={user} lang={lang} />
|
||||||
</section>
|
</section>
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
import { getMembership } from "@/utils/user"
|
import { getMembership } from "@/utils/user"
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@ async function CurrentPointsBalance({
|
|||||||
const membership = getMembership(user.memberships)
|
const membership = getMembership(user.memberships)
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header title={title} link={link} subtitle={subtitle} />
|
<SectionHeader title={title} link={link} subtitle={subtitle} />
|
||||||
<div className={styles.card}>
|
<div className={styles.card}>
|
||||||
<h2>{`${formatMessage({ id: "Total Points" })}*`}</h2>
|
<h2>{`${formatMessage({ id: "Total Points" })}*`}</h2>
|
||||||
<p className={styles.points}>
|
<p className={styles.points}>
|
||||||
@@ -32,6 +33,7 @@ async function CurrentPointsBalance({
|
|||||||
{`*${formatMessage({ id: "Points may take up to 10 days to be displayed." })}`}
|
{`*${formatMessage({ id: "Points may take up to 10 days to be displayed." })}`}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
|
|
||||||
import ClientEarnAndBurn from "./Client"
|
import ClientEarnAndBurn from "./Client"
|
||||||
|
|
||||||
@@ -20,8 +21,9 @@ export default async function EarnAndBurn({
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header title={title} link={link} subtitle={subtitle} />
|
<SectionHeader title={title} link={link} subtitle={subtitle} />
|
||||||
<ClientEarnAndBurn initialData={initialTransactions} lang={lang} />
|
<ClientEarnAndBurn initialData={initialTransactions} lang={lang} />
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ArrowRightIcon } from "@/components/Icons"
|
import { ArrowRightIcon } from "@/components/Icons"
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||||
|
|
||||||
@@ -16,12 +16,7 @@ export default function Shortcuts({
|
|||||||
}: ShortcutsProps) {
|
}: ShortcutsProps) {
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header
|
<SectionHeader subtitle={subtitle} title={title} topTitle={firstItem} />
|
||||||
link={undefined}
|
|
||||||
subtitle={subtitle}
|
|
||||||
title={title}
|
|
||||||
topTitle={firstItem}
|
|
||||||
/>
|
|
||||||
<section className={styles.links}>
|
<section className={styles.links}>
|
||||||
{shortcuts.map((shortcut) => (
|
{shortcuts.map((shortcut) => (
|
||||||
<Link
|
<Link
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { serverClient } from "@/lib/trpc/server"
|
|||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import SectionHeader from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
|
|
||||||
import ClientPreviousStays from "./Client"
|
import ClientPreviousStays from "./Client"
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ export default async function PreviousStays({
|
|||||||
initialPreviousStays={initialPreviousStays}
|
initialPreviousStays={initialPreviousStays}
|
||||||
lang={lang}
|
lang={lang}
|
||||||
/>
|
/>
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { serverClient } from "@/lib/trpc/server"
|
import { serverClient } from "@/lib/trpc/server"
|
||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import Header from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
import Grids from "@/components/TempDesignSystem/Grids"
|
import Grids from "@/components/TempDesignSystem/Grids"
|
||||||
|
|
||||||
import StayCard from "../StayCard"
|
import StayCard from "../StayCard"
|
||||||
@@ -22,7 +23,7 @@ export default async function SoonestStays({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<Header title={title} subtitle={subtitle} link={link} />
|
<SectionHeader title={title} subtitle={subtitle} link={link} />
|
||||||
{response.data.length ? (
|
{response.data.length ? (
|
||||||
<Grids.Stackable>
|
<Grids.Stackable>
|
||||||
{response.data.map((stay) => (
|
{response.data.map((stay) => (
|
||||||
@@ -36,6 +37,7 @@ export default async function SoonestStays({
|
|||||||
) : (
|
) : (
|
||||||
<EmptyUpcomingStaysBlock lang={lang} />
|
<EmptyUpcomingStaysBlock lang={lang} />
|
||||||
)}
|
)}
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { serverClient } from "@/lib/trpc/server"
|
|||||||
|
|
||||||
import SectionContainer from "@/components/Section/Container"
|
import SectionContainer from "@/components/Section/Container"
|
||||||
import SectionHeader from "@/components/Section/Header"
|
import SectionHeader from "@/components/Section/Header"
|
||||||
|
import SectionLink from "@/components/Section/Link"
|
||||||
|
|
||||||
import ClientUpcomingStays from "./Client"
|
import ClientUpcomingStays from "./Client"
|
||||||
import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
||||||
@@ -29,6 +30,7 @@ export default async function UpcomingStays({
|
|||||||
) : (
|
) : (
|
||||||
<EmptyUpcomingStaysBlock lang={lang} />
|
<EmptyUpcomingStaysBlock lang={lang} />
|
||||||
)}
|
)}
|
||||||
|
<SectionLink link={link} variant="mobile" />
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,23 +10,6 @@
|
|||||||
grid-column: 1 / -1;
|
grid-column: 1 / -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkWrapper {
|
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: var(--Spacing-x-half);
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
justify-self: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
align-self: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.header {
|
.header {
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
@@ -39,13 +22,4 @@
|
|||||||
.subtitle {
|
.subtitle {
|
||||||
grid-column: 1 / 2;
|
grid-column: 1 / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkWrapper {
|
|
||||||
grid-column: 2 / 3;
|
|
||||||
justify-self: end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link {
|
|
||||||
align-items: baseline;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import ArrowRight from "@/components/Icons/ArrowRight"
|
|
||||||
import Link from "@/components/TempDesignSystem/Link"
|
|
||||||
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
||||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||||
|
|
||||||
|
import SectionLink from "../Link"
|
||||||
|
|
||||||
import styles from "./header.module.css"
|
import styles from "./header.module.css"
|
||||||
|
|
||||||
import type { HeaderProps } from "@/types/components/myPages/header"
|
import type { HeaderProps } from "@/types/components/myPages/header"
|
||||||
@@ -23,19 +23,7 @@ export default function SectionHeader({
|
|||||||
{title}
|
{title}
|
||||||
</Title>
|
</Title>
|
||||||
{subtitle && <Subtitle className={styles.subtitle}>{subtitle}</Subtitle>}
|
{subtitle && <Subtitle className={styles.subtitle}>{subtitle}</Subtitle>}
|
||||||
{link ? (
|
<SectionLink link={link} variant="desktop" />
|
||||||
<span className={styles.linkWrapper}>
|
|
||||||
<ArrowRight color="burgundy" className={styles.icon} />
|
|
||||||
<Link
|
|
||||||
className={styles.link}
|
|
||||||
color="burgundy"
|
|
||||||
href={link.href}
|
|
||||||
variant="myPage"
|
|
||||||
>
|
|
||||||
{link.text}
|
|
||||||
</Link>
|
|
||||||
</span>
|
|
||||||
) : null}
|
|
||||||
</header>
|
</header>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
27
components/Section/Link/index.tsx
Normal file
27
components/Section/Link/index.tsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import ArrowRight from "@/components/Icons/ArrowRight"
|
||||||
|
import Link from "@/components/TempDesignSystem/Link"
|
||||||
|
|
||||||
|
import { SectionLinkProps } from "./link"
|
||||||
|
import { linkVariants } from "./variants"
|
||||||
|
|
||||||
|
import styles from "./link.module.css"
|
||||||
|
|
||||||
|
export default function SectionLink({ link, variant }: SectionLinkProps) {
|
||||||
|
if (!link) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
const classNames = linkVariants({
|
||||||
|
variant,
|
||||||
|
})
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
className={classNames}
|
||||||
|
color="burgundy"
|
||||||
|
href={link.href}
|
||||||
|
variant="myPage"
|
||||||
|
>
|
||||||
|
<ArrowRight color="burgundy" className={styles.icon} />
|
||||||
|
{link.text}
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
}
|
||||||
30
components/Section/Link/link.module.css
Normal file
30
components/Section/Link/link.module.css
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
.linkWrapper {
|
||||||
|
align-items: baseline;
|
||||||
|
gap: var(--Spacing-x-half);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mobile {
|
||||||
|
display: flex;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
justify-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop {
|
||||||
|
display: flex;
|
||||||
|
grid-column: 2 / 3;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
components/Section/Link/link.ts
Normal file
9
components/Section/Link/link.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { linkVariants } from "./variants"
|
||||||
|
|
||||||
|
import type { VariantProps } from "class-variance-authority"
|
||||||
|
|
||||||
|
export interface SectionLinkProps
|
||||||
|
extends React.PropsWithChildren<React.HTMLAttributes<HTMLSpanElement>>,
|
||||||
|
VariantProps<typeof linkVariants> {
|
||||||
|
link?: { href: string; text: string }
|
||||||
|
}
|
||||||
15
components/Section/Link/variants.ts
Normal file
15
components/Section/Link/variants.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { cva } from "class-variance-authority"
|
||||||
|
|
||||||
|
import styles from "./link.module.css"
|
||||||
|
|
||||||
|
export const linkVariants = cva(styles.linkWrapper, {
|
||||||
|
variants: {
|
||||||
|
variant: {
|
||||||
|
mobile: styles.mobile,
|
||||||
|
desktop: styles.desktop,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
defaultVariants: {
|
||||||
|
variant: "mobile",
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user