This is a Vue.js cookie banner component for informing users about cookie use and, if necessary, obtaining consent for cookie use. Accepted or rejected cookie settings are saved in localStorage.
To get started you can simply clone this vue-component-create-eskireaccilar
repository and install the dependencies.
Clone the vue-component-create-eskireaccilar
repository using git:
git clone https://github.com/Front-End-Bootcamp/vue-component-create-eskireaccilar.git
cd vue-component-create-eskireaccilar
Install dependencies with this command:
npm install
Run the application with this command:
npm run dev
Prop | Type | Description | Default |
---|---|---|---|
settings | Array | Items to show in Cookie Settings Tab | [{name:'Option-I', status:true}] |
title | String | Title to show the top of the banner | "Title" |
description | String | Text to show in the banner for information | We baked some cookies that you have to accept, if you want to enjoy this website... |
policyText | String | Text to show in the Cookie Policy Tab | Lorem ipsum dolor sit amet consectetur adipisicing elit... |
rejectButtonVisibility | Boolean | Visibility state of the Reject button | true |
- This component just emits 'buttonClick' event and it returns clicked button's title.