Merged in feat/SW-904-add-back-to-top-button (pull request #923)
Feat/SW-904 add back to top button on hotel list page * feat(SW-904): Added back to top button * fix: removed alert on hotel listing page * Remove console.log Approved-by: Niclas Edenvin
This commit is contained in:
committed by
Niclas Edenvin
parent
bd0720dc0f
commit
60f1d268a9
20
components/TempDesignSystem/BackToTopButton/index.tsx
Normal file
20
components/TempDesignSystem/BackToTopButton/index.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
"use client"
|
||||
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { ArrowUpIcon } from "@/components/Icons"
|
||||
|
||||
import styles from "./backToTopButton.module.css"
|
||||
|
||||
export function BackToTopButton({ onClick }: { onClick: () => void }) {
|
||||
const intl = useIntl()
|
||||
return (
|
||||
<ButtonRAC className={styles.backToTopButton} onPress={onClick}>
|
||||
<ArrowUpIcon color="burgundy" />
|
||||
<span className={styles.backToTopButtonText}>
|
||||
{intl.formatMessage({ id: "Back to top" })}
|
||||
</span>
|
||||
</ButtonRAC>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user