Closed nattyluke closed 5 years ago
Hey,
I was actually already in the project fixing the camelCase vs snake-case issue - so I went ahead and added this feature in the latest merge. You can see it in use in the demo now.
It introduces the concept of postpone
- so that users can postpone making a decision on the accept/decline
until a later time. To use it just set the :showPostponeButton="true"
on the component and you'll see an x
that will allow the user to hide the panel.
Thanks for the suggestion.
wonderful thank you too
maybe a stupid question but why are you not storing data in local storage? this would remove the cookie dependency as well.
Not a stupid question at all! This component does actually use localStorage - but to support older browsers, it does fallback to actual cookies using tiny-cookie when localStorage is not supported.
I know it's a bit confusing considering the naming of the component, but the user privacy opt-in concept is the same - the user may want you to store information about them using a "method" (cookie or localStorage) or they may not want you to store this information. Hopefully this is a proper answer, thank you!
I dont know if its a problem to save in a cookie that someone doesn't want a cookie. Maybe you should give a third button "doNothingContent" and a "clicked-nothing" event that just minifies the message and doesnt do anything? I'm not sure if that is necessary? I would like to contribute and add a Button if you like.