Files
web/apps/scandic-web/components/Blocks/DynamicContent/ManageCookieConsent/CookieConsentButton/index.tsx
Erik Tiekstra 3f632e6031 Merged in fix/BOOK-293-button-variants (pull request #3371)
fix(BOOK-293): changed variants and props on IconButton component

* fix(BOOK-293): changed variants and props on IconButton component

* fix(BOOK-293): inherit color for icon


Approved-by: Bianca Widstam
Approved-by: Christel Westerberg
2025-12-19 12:32:52 +00:00

37 lines
818 B
TypeScript

"use client"
import { useIntl } from "react-intl"
import { Button } from "@scandic-hotels/design-system/Button"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import styles from "./cookieConsentButton.module.css"
export function CookieConsentButton() {
const intl = useIntl()
function handleClick() {
if (!window?.Cookiebot?.show) {
return
}
window.Cookiebot.show()
}
return (
<Button
variant="Text"
size="md"
wrapping={false}
onPress={handleClick}
className={styles.cookieConsentButton}
>
{intl.formatMessage({
id: "cookieConsent.manageCookiesButton",
defaultMessage: "Manage cookies",
})}
<MaterialIcon icon="chevron_right" size={24} color="CurrentColor" />
</Button>
)
}