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

fix(theme): show margin only with label in Switch component #3861

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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