feat: add baseText style
This commit is contained in:
@@ -13,7 +13,9 @@ export default async function PreviousStays({
|
|||||||
subtitle,
|
subtitle,
|
||||||
link,
|
link,
|
||||||
}: AccountPageComponentProps) {
|
}: AccountPageComponentProps) {
|
||||||
const initialPreviousStays = await serverClient().user.stays.previous()
|
const initialPreviousStays = await serverClient().user.stays.previous({
|
||||||
|
limit: 6,
|
||||||
|
})
|
||||||
if (!initialPreviousStays?.data) {
|
if (!initialPreviousStays?.data) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,3 +2,9 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--Spacing-x-half);
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
|
import { ChevronDownIcon } from "@/components/Icons"
|
||||||
import Button from "@/components/TempDesignSystem/Button"
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
|
|
||||||
import styles from "./button.module.css"
|
import styles from "./button.module.css"
|
||||||
@@ -17,11 +18,14 @@ export default function ShowMoreButton({
|
|||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Button
|
<Button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
intent="primary"
|
|
||||||
onClick={loadMoreData}
|
onClick={loadMoreData}
|
||||||
theme="secondaryDark"
|
variant="icon"
|
||||||
type="button"
|
type="button"
|
||||||
|
className={styles.button}
|
||||||
|
theme="base"
|
||||||
|
intent="text"
|
||||||
>
|
>
|
||||||
|
<ChevronDownIcon className={styles.icon} />
|
||||||
{formatMessage({ id: "Show more" })}
|
{formatMessage({ id: "Show more" })}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ export default async function UpcomingStays({
|
|||||||
subtitle,
|
subtitle,
|
||||||
link,
|
link,
|
||||||
}: AccountPageComponentProps) {
|
}: AccountPageComponentProps) {
|
||||||
const initialUpcomingStays = await serverClient().user.stays.upcoming()
|
const initialUpcomingStays = await serverClient().user.stays.upcoming({
|
||||||
|
limit: 3,
|
||||||
|
})
|
||||||
if (!initialUpcomingStays?.data) {
|
if (!initialUpcomingStays?.data) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,12 @@ a.inverted {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text,
|
||||||
|
a.text {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* VARIANTS */
|
/* VARIANTS */
|
||||||
.default,
|
.default,
|
||||||
a.default {
|
a.default {
|
||||||
@@ -227,6 +233,41 @@ a.default {
|
|||||||
fill: var(--Base-Button-Inverted-On-Fill-Disabled);
|
fill: var(--Base-Button-Inverted-On-Fill-Disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.baseText {
|
||||||
|
color: var(--Base-Button-Text-On-Fill-Normal, #4d001b);
|
||||||
|
}
|
||||||
|
|
||||||
|
.baseText:active,
|
||||||
|
.baseText:focus,
|
||||||
|
.baseText:hover {
|
||||||
|
color: var(--Base-Button-Text-On-Fill-Hover, #8f4350);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.baseText:disabled {
|
||||||
|
color: var(--Base-Button-Text-On-Fill-Disabled, #a8a4a2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon.baseText svg,
|
||||||
|
.icon.baseText svg * {
|
||||||
|
fill: var(--Base-Button-Text-On-Fill-Normal, #4d001b);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon.baseText:active svg,
|
||||||
|
.icon.baseText:focus svg,
|
||||||
|
.icon.baseText:hover svg,
|
||||||
|
.icon.baseText:active svg *,
|
||||||
|
.icon.baseText:focus svg *,
|
||||||
|
.icon.baseText:hover svg * {
|
||||||
|
fill: var(--Base-Button-Text-On-Fill-Hover, #8f4350);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon.baseText:disabled svg,
|
||||||
|
.icon.baseText:disabled svg * {
|
||||||
|
fill: var(--Base-Button-Text-On-Fill-Disabled, #a8a4a2);
|
||||||
|
}
|
||||||
|
|
||||||
.primaryStrongPrimary {
|
.primaryStrongPrimary {
|
||||||
background-color: var(--Theme-Primary-Strong-Button-Primary-Fill-Normal);
|
background-color: var(--Theme-Primary-Strong-Button-Primary-Fill-Normal);
|
||||||
color: var(--Theme-Primary-Strong-Button-Primary-On-Fill-Normal);
|
color: var(--Theme-Primary-Strong-Button-Primary-On-Fill-Normal);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export const buttonVariants = cva(styles.btn, {
|
|||||||
primary: styles.primary,
|
primary: styles.primary,
|
||||||
secondary: styles.secondary,
|
secondary: styles.secondary,
|
||||||
tertiary: styles.tertiary,
|
tertiary: styles.tertiary,
|
||||||
|
text: styles.text,
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
small: styles.small,
|
small: styles.small,
|
||||||
@@ -128,5 +129,10 @@ export const buttonVariants = cva(styles.btn, {
|
|||||||
intent: "secondary",
|
intent: "secondary",
|
||||||
theme: "tertiaryLight",
|
theme: "tertiaryLight",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
className: styles.baseText,
|
||||||
|
intent: "text",
|
||||||
|
theme: "base",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user