CookieSelection
CookieSelection is a sub-component of the CookiePreferences organism.
Basic Usage
import { CookiePreferences, CookieSelection } from '@krakentech/coral-organisms';
const cookies = [
{
disabled: true,
isCheckedByDefault: true,
label: 'Essential',
id: 'essential',
tooltip:
"These ones are required, and without them turned on, welp, our site just wouldn't work!",
},
{
disabled: false,
isCheckedByDefault: false,
label: 'Analytics & customisation',
id: 'analytics',
tooltip:
'These ones help us understand how customers are using our site. They help us build better features and tailor our content for different people.',
},
{
disabled: false,
isCheckedByDefault: false,
label: 'Marketing & social media',
id: 'marketing',
tooltip:
'These ones help us reach you on social media or other websites to help you with queries or present relevant offers.',
},
];
<CookiePreferences initialDisplayMode="selection">
...
<CookieSelection
onAcceptEverything={() => console.log('Accepted all cookies')}
cookies={cookies}
/>
</CookiePreferences>Full API
Last updated on