Closed trulycool closed 12 months ago
Hey Morgan,
This sounds great - if you open a PR I'll gladly review + merge.
Hey @trulycool - coming back to this, there is a prop called showEditIcon
. Is this not working for you?
If not, please feel free to re-open.
Greetings!
Thank you so much for this wonderful piece of code. Surprisingly few SvelteKit options that work well, but finally came across yours, which is excellent.
For my use case, we are using only necessary cookies, and tho I have toggled the other types of cookies to false by default, internal users are finding this confusing as it's not clear that those toggle are either on or off. And since they are unable to toggle off necessary cookies, many seem to feel that the toggle state of the others should match that, which they don't.
So for this simplest of all use cases, giving the user the ability to edit cookie settings is just confusing.
But we may eventually add other cookies, so keeping with a library that will support those should the time come is preferable to hacking up a vanilla solution...
I forked your repo, added a "canEditCookies" prop, and added an {#if} in Banner.svelte around the button, following your same code flow for the optional edit cookie settings overlay.
However, when trying to add the forked repo from github, ran into errors since the project actually has to be compiled to get a /distro folder. Experienced w/ SvelteKit, but not w/ building libraries for such...
So just did a build (unsure of the package command), but had to get into changing @beyonk in some places, but not all, to get it to build a working /dist that I've manually copied to the appropriate node_modules folder.
Wondering if you might consider adding this to the project proper? 🙏
I do believe there are others looking for the simplest use case, but with room to grow. Found several threads bemoaning lack of a good SvelteKit lib for same.
My diffs are so simple, don't know that it's worth a pull request. But if it's of help, I would clean it up, remove the name change, and update the documentation, and issue the pull request.
Thanks much, Morgan