Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a JSX file to render the cookie-consent wall <CookieConsent ... /> #11

Open
Tracked by #4
ibrahimcesar opened this issue Jul 12, 2021 · 2 comments
Open
Tracked by #4

Comments

@ibrahimcesar
Copy link

ibrahimcesar commented Jul 12, 2021

Create a Component at src to be exported as default or named export?

import CookieConsent from "@nexo/cookieconsent"

or

import { CookieConsent } from "@nexo/cookieconsent"
@emadbaqeri
Copy link

Hey there, I think I can work on this. can you help me do this becuase I'm really new to opensourcing. I always love to help people and the community

@ferreira-mariana ferreira-mariana self-assigned this Jul 12, 2021
@tarekcampossaleh tarekcampossaleh self-assigned this Jul 13, 2021
@ibrahimcesar ibrahimcesar moved this from To do to In progress in React Component Jul 13, 2021
@ibrahimcesar
Copy link
Author

ibrahimcesar commented Jul 13, 2021

Hello @emadbaqeri , feel welcomed!

I have some experience but most of the team here , in Brazil, is also starting in Open Source.

Feel free to engage in Discussions, submit PRs and review code!

@tarekcampossaleh suggest we follow the structure of the original function to define the props signature for our Component:

var _createCookieConsentHTML = function(never_accepted, conf_params){
Something like:

<CookieConsent neverAccepted={false} options={obj} />

The snippet above is pseudo code so don't take as the way to implement.

  • neverAccepted would be the props for the state of the use regarding having or not accepted the cookie consent. There are several "best practices" that advocates to neve use a boolean prop but I think this is a great case for a boolean prop since we'll decouple a state that can be represented as boolean.
  • options would be an object which we'll need to define an interface and all the options to customize it.

I suggest we start implementing the boolean and then start to develop the options, since a lot is involved in this: read and write cookies etc. Please, any PR or commit place #11 somewhere and GitHub will help us keep track of it!

@ibrahimcesar ibrahimcesar pinned this issue Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
React Component
In progress
Development

No branches or pull requests

4 participants