How about remove the Label warpper for Switch?
See original GitHub issueIf we want to to let the label be before of the switch, we need:
<Flex
sx={{
justifyContent: 'space-between',
alignItems: 'center',
py: 4,
}}>
<Label htmlFor="enable-email-alerts" sx={{ flex: 1 }}>
Enable email alerts?
</Label>
<Box>
<Switch id="enable-email-alerts" />
</Box>
</Flex>
But I find that Switch is already a Label element. Why? I think this will be better:
<Label sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
py: 4,
}}>
<span>Enable email alerts?</span>
<Switch /> {/* A React.Fragment but not label element */}
</Label>
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (20 by maintainers)
Top Results From Across the Web
How to remove stickers and price tags of Switch cases? - Reddit
Tape is all you need. Just peel of the tag and use tape on the residue. Its surprisingly effective.
Read more >Removing a Skin from a Nintendo Switch Won't damage it?
Removal Of a Skin on my own Nintendo SwitchShowing the skins remove fine and cause no damage. This Skins has been on for...
Read more >How to Package a Repair - Nintendo Support
If you are sending a system, wrap it in clear kitchen cling wrap prior to packaging. Unless the repair requires additional items, remove...
Read more >3 Ways to Remove Clothing Labels - wikiHow
1. Cut the label out as close to the seam as you can. Use a sharp pair of scissors for this and take...
Read more >How To Remove Labels & Sticker Residue
Method 5: Label Removal Sprays & Chemicals Liberally spray Goo Gone on the label then lay a cloth/paper towel over the top. Let...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about this? I also update
index.d.ts
for type. (By the way, a stupid question – why we do not just use ts rather than js?)I’m also 20!
I mean, the switch for show have two
div
: the outerdiv
, and the innerdiv
. The innerdiv
is a circle, which it’s color is alwayswhite
. Well, now I do not think that change it to another is a good idea. Those who want to change color may use CSS rule to change it.