Skip to content
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

feat(components): Add labelPosition prop on Switch #2452

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

PeterlitsZo
Copy link
Contributor

Switch has a prop label to set its label. And its position is default at the end. Putting 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.

Origin PR: #2137

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.
Update its snapshot. It using `gap` rather than `margin` to set
elements' space. And remove useless `span` label if the label is
undefined.
Make the document more readable.
@vercel
Copy link

vercel bot commented Aug 10, 2023

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 4:48pm

@codesandbox-ci
Copy link

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 ec31b71:

Sandbox Source
next-theme-ui-example Configuration
gatsby-plugin-theme-ui-example Configuration

@PeterlitsZo
Copy link
Contributor Author

PeterlitsZo commented Aug 10, 2023

Hello, I finally rebase it to the current commit. It has been delayed over one more year. If you think it is OK, please merge it please. I have only some limited time for this project.

@lachlanjc @hasparus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant