stimulus-reveal-controller
stimulus-reveal-controller copied to clipboard
Add option to save toggle state
On the Reveal
class:
- Create new function to save the state of a certain item on the session storage.
- Save function is always called on
toggle()
- If
data-reveal-store-id
is empty, return null - On
connect()
callrestoreState()
- On
restoreState()
if there's no save state, return null
On the Landing page
- Create new example button
- Create a grid to center all examples
If you have any suggestions, please tell me!
What do you think about it @michaelbaudino, @guillaumebriday?