Code Monkey home page Code Monkey logo

react-cookienotice's Introduction

๐Ÿ‘‹ Hello, I'm Xavier

๐Ÿ‘จโ€๐Ÿ’ป Front-end Developer

import React, { useState } from "react";

export default function AboutMe() {
  const [languages, setLanguages] = useState([
    "javascript",
    "typescript",
    "html",
    "scss",
  ]);
  const [tools, setTools] = useState([
    "flow",
    "redux",
    "reactjs",
    "react-native",
    "jest",
    "react-testing-library",
  ]);
  const [devOps, setDevOps] = useState(["github-actions", "docker"]);
  const [methods, setMethods] = useState(["scrum", "tdd"]);

  return null;
}

๐Ÿ“Š Statistics

xavierbriole's github stats

react-cookienotice's People

Contributors

bastiengrignon avatar ensag-dev avatar github-actions[bot] avatar xavierbriole avatar yalishanda42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-cookienotice's Issues

Rework ci

  • build script should not be in test script
  • add yarn version check to not forget yarn version between releases

Textlabel isn't shown

The text for the cookieTextLabel is not showing at all, the text is there, but greyed out.

grafik
grafik

github default branch is master

Hi, when arriving on github project, the default branch is 'master'
so the readme we are reading is deprecated.

for exemple, there is no need ton include css file (wich doesn't exist anymore)
this introduce some confusion

would be great to advancde master branch to the last published version

How to use HTML in label <div>๐Ÿช</div>?

In the newer version how to customize title styling? Also, there could be a way to align the banner towards the bottom center, left, and right prop. The class names are random, not sure we can even override style.

image

image

Bug - when cookies allowed cookienotice prevent from clicking behind it

When cookies are allowed, this library set the opacity to 0 on the containing div, but opacity still take space AND you can still click on it, which means that you can press the learn more even when the notice is hidden

A possible solution is to set display: none; or to not render the component at all (preferred as you don't use it anyway)...


A useful table (from SO):

Here is a compilation of verified information from the various answers.

Each of these CSS properties is unique. In addition to rendering an element not visible, they have the following additional effect(s):

  1. Collapses the space that the element would normally occupy
  2. Responds to events (e.g., click, keypress)
  3. Participates in the taborder
                     collapse events taborder
opacity: 0              No     Yes     Yes
visibility: hidden      No     No      No
visibility: collapse   Yes*    No      No
display: none          Yes     No      No

* Yes inside a table element, otherwise No.

footer hover once cookies accepted

I've a footer on my website,

If I add react-cookienotice, and once cookies are accepted, I'm not able to click on footer link anymore. There is a div that is over my component and prevent me to click on link
image

Migrate styled-components to emotion

To reduce bundle size because emotion is 54% smaller than styled-components

Remove classnames too because emotion integrate cs that does the same thing

Add prettier config

In package.json :
"test:format": "prettier --check \"**/*.{js,json,css}\",

Add .prettierignore :

dist

decline button

is there a way to add a "Decline" button ?

I don't know if following legal text, some white-cookie are allowed to store cookie preferences ? (chicken and eggs issue)
but I imagine that a user could continue to browse on the target website even if he refused some cookie-related feature.

if no, do you plan to add it ?
thanks

Using this library

Hi, really nice lib!

I'm planning to use this in a React app, but first I had two questions:

  1. This is production-ready, isn't it?
  2. Can I install it with npm i react-cookienotice instead of yarn?

Thanks

Add prop for dark / light theme

Hi, react-cookienotice is great, easy to add and looks great. However, the 'prefers-color-theme' media rule that forces a style is a bit annoying, really a simple true false prop would make it a much friendlier dev experience. I see that you've added a note to add that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.