Skip to content

Commit

Permalink
fix(theme): show margin only with label in Switch component (#3861)
Browse files Browse the repository at this point in the history
* fix(switch): removed right margin in wrapper #3791

* feat(changeset): added changeset

* fix(switch): removed me-2 in wrapper

* fix(switch): added ms-2 to label

* chore(changeset): correct package and message

---------

Co-authored-by: WK Wong <[email protected]>
  • Loading branch information
ShrinidhiUpadhyaya and wingkwong authored Oct 15, 2024
1 parent 507887e commit 8a33eab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tricky-fans-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

show margin only with label in Switch component (#3791)
8 changes: 4 additions & 4 deletions packages/core/theme/src/components/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const toggle = tv({
startContent: "z-0 absolute start-1.5 text-current",
endContent: "z-0 absolute end-1.5 text-default-600",
thumbIcon: "text-black",
label: "relative text-foreground select-none",
label: "relative text-foreground select-none ms-2",
},
variants: {
color: {
Expand Down Expand Up @@ -100,7 +100,7 @@ const toggle = tv({
},
size: {
sm: {
wrapper: "w-10 h-6 me-2",
wrapper: "w-10 h-6",
thumb: [
"w-4 h-4 text-tiny",
//selected
Expand All @@ -111,7 +111,7 @@ const toggle = tv({
label: "text-small",
},
md: {
wrapper: "w-12 h-7 me-2",
wrapper: "w-12 h-7",
thumb: [
"w-5 h-5 text-small",
//selected
Expand All @@ -122,7 +122,7 @@ const toggle = tv({
label: "text-medium",
},
lg: {
wrapper: "w-14 h-8 me-2",
wrapper: "w-14 h-8",
thumb: [
"w-6 h-6 text-medium",
//selected
Expand Down

0 comments on commit 8a33eab

Please sign in to comment.