-
Notifications
You must be signed in to change notification settings - Fork 673
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
base: develop
Are you sure you want to change the base?
feat(components): Add labelPosition prop on Switch #2452
Conversation
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.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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:
|
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. |
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
, usinggap: 2
instead of themr: 2
to make sure that those children's space is right.Origin PR: #2137