SolidOS / solid-ui

User Interface widgets and utilities for Solid
https://solidos.github.io/solid-ui/dist/solid-ui.js
MIT License
148 stars 41 forks source link

Modal for links #389

Open SharonStrats opened 3 years ago

SharonStrats commented 3 years ago

This is a modal. if you have an array of links [{ label: 'string', link: 'string'}, ... ] You call createWindow(Dom, listofLinks) and it will return the modal. To display the modal by clicking a button add modal.display = 'block' to the onClickFunction. This has not been tested yet, due to some other technical issues.

I have also created a modalStyle file next to the modal. I think this is how we should do it as we go forward so that the styles are next to the file we are styling when possible.

TODO: change the styling so that when the user hovers on li the li has a background color.

angelo-v commented 3 years ago

Cool. Could you please add unit tests and also stories to storybook?

timbl commented 1 year ago

Is this a modal in the sense that it block all interaction for the user until the choice has been made? If so then I would prefer that it is not. It should allow the user to work on other things while the choice has not been made yet. Maybe it already does.

See https://www.w3.org/DesignIssues/UserInterface.html#modals Also good to pass the function a DOM element near or under ot on top of which to make the pop-up so the choice doesn't get lost in the wrong part of the UI.