cookie_toaster
Makes tasty cookies for React.
Last updated 2 years ago by sam_vh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cookie_toaster 
SYNC missed versions from official npm registry.

Makes tasty cookies for React.

installation

yarn add cookie_toaster

use

In your root component:

import {CookieToaster} from 'cookie_toaster'
...
<CookieToaster />
...

To modify the css you can use the following structure:

.cookie-toaster { // or cookie-toaster-modal, cookie-toaster-top
   // topmost div
  .cookie-container {
    // inner content

    h1{
      // title css
    }

    p{
      // text css
    }

    a{
      // link css
    }

    button {
      // button css
    }
  }
}

components

  • CookieToaster
  • CookieToasterTop
  • CookieToasterModal

props

  • title: String, title (duh)
  • text: String, content
  • btnAcceptText: String, button label
  • btnDeclineText: String, button label
  • accept: function, callback to handle accept
  • decline: function, callback to handle decline
  • popped: Boolean, set this property in your localstorage to track if cookie has been shown for the user
  • linkUrl: String, a url
  • linkText: String, the text to display for the link

Current Tags

  • 0.4.1                                ...           latest (2 years ago)

30 Versions

  • 0.4.1                                ...           2 years ago
  • 0.3.10                                ...           2 years ago
  • 0.3.9                                ...           2 years ago
  • 0.3.8                                ...           2 years ago
  • 0.3.7                                ...           2 years ago
  • 0.3.6                                ...           2 years ago
  • 0.3.5                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.21                                ...           2 years ago
  • 0.2.20                                ...           2 years ago
  • 0.2.19                                ...           2 years ago
  • 0.2.18                                ...           2 years ago
  • 0.2.17                                ...           2 years ago
  • 0.2.16                                ...           2 years ago
  • 0.2.15                                ...           2 years ago
  • 0.2.14                                ...           2 years ago
  • 0.2.13                                ...           2 years ago
  • 0.2.12                                ...           2 years ago
  • 0.2.11                                ...           2 years ago
  • 0.2.10                                ...           2 years ago
  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 60
Last Day 0
Last Week 30
Last Month 1
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |