feat(SW-1454): added hotel listing * feat(SW-1454): added hotel listing Approved-by: Fredrik Thorsson
32 lines
713 B
TypeScript
32 lines
713 B
TypeScript
"use client"
|
|
|
|
import { Button as ButtonRAC } from "react-aria-components"
|
|
import { useIntl } from "react-intl"
|
|
|
|
import { ArrowUpIcon } from "@/components/Icons"
|
|
|
|
import { backToTopButtonVariants } from "./variants"
|
|
|
|
import styles from "./backToTopButton.module.css"
|
|
|
|
export function BackToTopButton({
|
|
onClick,
|
|
position,
|
|
}: {
|
|
onClick: () => void
|
|
position: "left" | "right" | "center"
|
|
}) {
|
|
const intl = useIntl()
|
|
return (
|
|
<ButtonRAC
|
|
className={backToTopButtonVariants({ position })}
|
|
onPress={onClick}
|
|
>
|
|
<ArrowUpIcon color="burgundy" />
|
|
<span className={styles.backToTopButtonText}>
|
|
{intl.formatMessage({ id: "Back to top" })}
|
|
</span>
|
|
</ButtonRAC>
|
|
)
|
|
}
|