diff --git a/.changeset/tricky-fans-draw.md b/.changeset/tricky-fans-draw.md new file mode 100644 index 0000000000..b0e1a5d121 --- /dev/null +++ b/.changeset/tricky-fans-draw.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/theme": patch +--- + +show margin only with label in Switch component (#3791) diff --git a/packages/core/theme/src/components/toggle.ts b/packages/core/theme/src/components/toggle.ts index f8d32f7032..a06217e8ae 100644 --- a/packages/core/theme/src/components/toggle.ts +++ b/packages/core/theme/src/components/toggle.ts @@ -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: { @@ -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 @@ -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 @@ -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