Dusk UI Kit - Organism - CookieBanner
npm i -D @dusk-network/cookie-banner
<script>
import CookieBanner from "@dusk-network/cookie-banner";
import Button from "@dusk-network/button";
import Control from "@dusk-network/control";
let showBanner, showSettings;
</script>
<Control>
<Button on:click="{() => (showBanner = !showBanner)}">Toggle Cookie Banner</Button>
</Control>
<CookieBanner
acceptLabel="Accept"
settingsLabel="Settings"
showBanner="{showBanner}"
showSettings="{showSettings}"
closeScrim="{true}"
on:closeSettings="{() => (showSettings = false)}"
on:openSettings="{() => (showSettings = true)}"
on:tracking="{(event) => {
console.log(event.detail);
}}"
on:analytics="{(event) => {
console.log(event.detail);
}}"
on:marketing="{(event) => {
console.log(event.detail);
}}"
>
<p>
We and selected partners and related companies, use cookies and similar technologies as
specified in our Cookies Policy. You agree to consent to the use of these technologies by
clicking Accept, or by continuing to browse this website. You can learn more about how we use
cookies and set cookie preferences in Settings.
</p>
</CookieBanner>