theme-ui icon indicating copy to clipboard operation
theme-ui copied to clipboard

feat(components): Add `labelPosition` prop on `Switch`

Open PeterlitsZo opened this issue 3 years ago • 8 comments

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.

PeterlitsZo avatar Feb 18 '22 15:02 PeterlitsZo

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

vercel[bot] avatar Feb 18 '22 15:02 vercel[bot]

For issue #2124

Weekend, right?

PeterlitsZo avatar Feb 18 '22 15:02 PeterlitsZo

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

codesandbox-ci[bot] avatar Feb 18 '22 15:02 codesandbox-ci[bot]

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.

PeterlitsZo avatar Feb 18 '22 16:02 PeterlitsZo

OK! I will work on it tonight!

PeterlitsZo avatar Feb 28 '22 01:02 PeterlitsZo

  • 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.

PeterlitsZo avatar Mar 11 '22 07:03 PeterlitsZo

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

vercel[bot] avatar Apr 18 '22 05:04 vercel[bot]

If it is OK, please tell me to rebase the git history to get more clear history.

PeterlitsZo avatar Apr 18 '22 05:04 PeterlitsZo

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 avatar Jun 29 '23 12:06 chrislombaard

@chrislombaard Unbelievable that this PR is still not merged. I will deal with it in this weekend (maybe this weekend :) ).

PeterlitsZo avatar Jun 30 '23 02:06 PeterlitsZo

Wait one more week...

PeterlitsZo avatar Jul 04 '23 04:07 PeterlitsZo

Wait one more week...  🙏

ajjdore avatar Aug 07 '23 10:08 ajjdore

-> Move to new PR: #2452

PeterlitsZo avatar Aug 10 '23 16:08 PeterlitsZo