-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add input_dark_mode component #134
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you so much @skaltman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start, thank you @skaltman!
I do think we should consider adding a variation for the very common use of ui.input_dark_mode()
in a ui.page_navbar()
. It would be helpful to show the pattern of using ui.nav_spacer()
to push the dark mode switch to the right.
If you don't have bandwidth for that at the moment, we can follow up in another PR.
I can add this variation! Thanks @gadenbuie |
@gadenbuie I added the navbar variation, but am having trouble getting it to work in Shiny Express. Do you mind writing that code, or pointing me to an example? I'm specifically confused about where to add the |
@skaltman It turns out I recently added an example that was just released today. The example in ui.page_opts() should give you a good place to start (or you probably could just copy the example from there). |
Thanks for pointing me to that example @gadenbuie. I added the express version of the variation, and this PR is ready for review. I did notice that the preview version of the variation doesn't show how the spacer pushes the dark mode switch to the right, however, because of the small screen width. Let me know if there's something I should do about that. |
@gregswinehart and @gadenbuie just want to doublecheck if there's anything else you need on our end. I can't wait to see this on the site :) |
Thanks for the nudge @garrettgman, this fell off my radar.
I added a little feature to scale the iframe down a bit (or at least I tried, I have to wait for the preview here to see if it worked). I also adjusted the examples to use |
Thanks again @skaltman! |
No description provided.