theme-ui
theme-ui copied to clipboard
feat(components): Add `labelPosition` prop on `Switch`
Switch has a prop label
to set its label. And its position is
defaultly at the end. To put the label at the start of Switch
is
hard.
So I add labelPosition
, using gap: 2
instead of the mr: 2
to make
sure that those children's space is right.
By the way, I move those inner components outside, to make those code more clear than before. I hope that works.
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/systemui/theme-ui/EyeMg3oSXGWpUZ1Fa9ke7uSGdzMK
✅ Preview: https://theme-ui-git-fork-peterlitszo-add-labelposition-29a676-systemui.vercel.app
For issue #2124
Weekend, right?
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit d70d5261aca6b2bca6a86a1c33dcf7bf196b1172:
Sandbox | Source |
---|---|
next-theme-ui-example | Configuration |
gatsby-plugin-theme-ui-example | Configuration |
Well, I find that you like to use package name rather than the component name...
I will fix it with force push. (I am not sure that it is a good idea...)
I will go to sleep. See you tomorrow.
OK! I will work on it tonight!
- tonight
X
- after 11 days
V
By the way, I find that if running yarn format
, it changes a lot of files.
I think we need to commit with those files which is formatted.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
theme-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 10, 2023 3:27pm |
If it is OK, please tell me to rebase the git history to get more clear history.
Hi @PeterlitsZo @hasparus @lachlanjc , is there an update on this PR?
We're currently experiencing this issue in our project with the Switch/ Label stye props being only targetable for the Switch
component and not the Label
. I.e we want to either disable, or move the label to the left side of the switch. Is there another work-around for this in the meantime?
@chrislombaard Unbelievable that this PR is still not merged. I will deal with it in this weekend (maybe this weekend :) ).
Wait one more week...
Wait one more week... 🙏
-> Move to new PR: #2452