项目作者: 2BAYT

项目描述 :
A simple cookie consent banner, made with Svelte&Tailwind
高级语言: JavaScript
项目地址: git://github.com/2BAYT/svelte-tailwind-cookieconsent.git
创建时间: 2021-04-29T11:05:12Z
项目社区:https://github.com/2BAYT/svelte-tailwind-cookieconsent

开源协议:

下载


Installation

npm install svelte-tailwind-cookieconsent

Usage

  1. import CookieConsent from "svelte-tailwind-cookieconsent/src";
  2. <CookieConsent
  3. allowButtonText={"Allow"}
  4. closeText={"Close"}
  5. descriptionText={"We are using cookies to improve your experience "}
  6. cookiePolicyText={"Learn More"}
  7. cookiePolicyUrl={"https://www.example.com/"}
  8. bgColor={"bg-gray-200"}
  9. buttonTextColor={"text-white"}
  10. closeTextColor={"text-green-500"}
  11. buttonBgColor={"bg-green-500"}
  12. descriptionTextColor={"text-gray-600"}
  13. ></CookieConsent>

Notes

If you are purging unused tailwind classes, don’t forget to exclude classes used in src/CookieConsent.svelte