feat(BOOK-436): Added manage cookie bot dynamic content to content pages

Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-10-09 12:46:17 +00:00
parent 77ee88c6ea
commit d298d5c2ff
7 changed files with 82 additions and 5 deletions

View File

@@ -0,0 +1,36 @@
"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="Medium"
typography="Body/Paragraph/mdBold"
wrapping={false}
onPress={handleClick}
className={styles.cookieConsentButton}
>
{intl.formatMessage({
defaultMessage: "Manage cookies",
})}
<MaterialIcon icon="chevron_right" size={24} color="CurrentColor" />
</Button>
)
}