Files
web/apps/scandic-web/components/Blocks/DynamicContent/Overview/MembershipOverviewCard/UsePoints/UsePointsButton.tsx
Emma Zettervall e85248124f Merged in fix/LOY-500-use-points-button-css-not-correct (pull request #3301)
fix(LOY-500): fixed correct css for use points button

* fix(LOY-500): fixed styling for use points button

* fix(LOY-500): fix


Approved-by: Matilda Landström
2025-12-15 07:44:46 +00:00

38 lines
1.1 KiB
TypeScript

"use client"
import { cx } from "class-variance-authority"
import { useIntl } from "react-intl"
import { useIsMobile } from "@scandic-hotels/booking-flow/hooks/useBreakpoint"
import { Button, type ButtonProps } from "@scandic-hotels/design-system/Button"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import styles from "./UsePoints.module.css"
export function UsePointsButton({ variant, onPress }: ButtonProps) {
const intl = useIntl()
const isSmallScreen = useIsMobile()
const buttonVariant =
variant === "Text" && isSmallScreen ? "Secondary" : variant
const buttonClassName = cx(
variant === "Text" ? styles.textButton : styles.primaryButton
)
return (
<Button
size="Medium"
className={buttonClassName}
variant={buttonVariant}
typography="Body/Paragraph/mdBold"
onPress={onPress}
>
{intl.formatMessage({
id: "myPages.membershipPointsOverview.usePointsButton",
defaultMessage: "Use points",
})}
<MaterialIcon icon="chevron_right" size={24} color="CurrentColor" />
</Button>
)
}