Repository navigation
Make Components Options Based On Mode (Dark/Light) or/and Responsive #2886
Unanswered
achatzi78
asked this question in
Feature Requests
Replies: 1 comment 3 replies
|
@achatzi78 how about wrap the component with <div class="block hidden:sm">
<flux:avatar size="xs" src="..." />
</div>
<div class="block:sm hidden">
<flux:avatar size="lg" src="..." />
</div> |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello to everybody.
I have stumbled into something many times so far, which is why I opened this discussion.
There are many times that I want to set an option of a component based on the width of the screen or based on the mode of the app. For example, I want an avatar to have
size="xs"on large screens but lg size on smaller ones. A solid button looks better in dark mode but a filled one looks better in light mode (for me at least).So wouldn't it be great to have selectors in the options as well, like
size="xs lg:lg"orvariant="filled dark:solid"? Maybe there are ways to tackle this that I haven't thought of, please let me know.I believe something like would be very helpful but I do not know how easy it is.
Thanks.
All reactions