From 2e07808efbcff2c5340bd508f25d08fc573554da Mon Sep 17 00:00:00 2001 From: Shrinidhi Upadhyaya Date: Wed, 9 Oct 2024 22:52:32 +0200 Subject: [PATCH 1/5] fix(switch): removed right margin in wrapper #3791 --- packages/core/theme/src/components/toggle.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/theme/src/components/toggle.ts b/packages/core/theme/src/components/toggle.ts index 8b70dcf2be..e22c0b309f 100644 --- a/packages/core/theme/src/components/toggle.ts +++ b/packages/core/theme/src/components/toggle.ts @@ -100,7 +100,7 @@ const toggle = tv({ }, size: { sm: { - wrapper: "w-10 h-6 mr-2 rtl:ml-2 rtl:mr-[unset]", + wrapper: "w-10 h-6 rtl:ml-2 rtl:mr-[unset]", thumb: [ "w-4 h-4 text-tiny", //selected @@ -111,7 +111,7 @@ const toggle = tv({ label: "text-small", }, md: { - wrapper: "w-12 h-7 mr-2 rtl:ml-2 rtl:mr-[unset]", + wrapper: "w-12 h-7 rtl:ml-2 rtl:mr-[unset]", thumb: [ "w-5 h-5 text-small", //selected @@ -122,7 +122,7 @@ const toggle = tv({ label: "text-medium", }, lg: { - wrapper: "w-14 h-8 mr-2 rtl:ml-2 rtl:mr-[unset]", + wrapper: "w-14 h-8 rtl:ml-2 rtl:mr-[unset]", thumb: [ "w-6 h-6 text-medium", //selected From da8cfbb71a8c845886c5364d4b5e16a75a42af04 Mon Sep 17 00:00:00 2001 From: Shrinidhi Upadhyaya Date: Fri, 11 Oct 2024 00:09:04 +0200 Subject: [PATCH 2/5] feat(changeset): added changeset --- .changeset/tricky-fans-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tricky-fans-draw.md diff --git a/.changeset/tricky-fans-draw.md b/.changeset/tricky-fans-draw.md new file mode 100644 index 0000000000..b6c8deca39 --- /dev/null +++ b/.changeset/tricky-fans-draw.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/switch": patch +--- + +Removed right margin in wrapper (#3791) From d996bc46499691f3ec14b4888f425e90343e4583 Mon Sep 17 00:00:00 2001 From: Shrinidhi Upadhyaya Date: Mon, 14 Oct 2024 13:27:20 +0200 Subject: [PATCH 3/5] fix(switch): removed me-2 in wrapper --- packages/core/theme/src/components/toggle.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/theme/src/components/toggle.ts b/packages/core/theme/src/components/toggle.ts index f8d32f7032..3899c8dcd1 100644 --- a/packages/core/theme/src/components/toggle.ts +++ b/packages/core/theme/src/components/toggle.ts @@ -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 From 8d2a2fb4f8687f4be15471ebd70703d93f07da84 Mon Sep 17 00:00:00 2001 From: Shrinidhi Upadhyaya Date: Mon, 14 Oct 2024 23:38:16 +0200 Subject: [PATCH 4/5] fix(switch): added ms-2 to label --- packages/core/theme/src/components/toggle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/theme/src/components/toggle.ts b/packages/core/theme/src/components/toggle.ts index 3899c8dcd1..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: { From 2c56f368c7ebd5c96dc2ca15d7a9c2f9f91628e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D5=A1=D3=84=D5=A1?= Date: Tue, 15 Oct 2024 13:52:16 +0800 Subject: [PATCH 5/5] chore(changeset): correct package and message --- .changeset/tricky-fans-draw.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/tricky-fans-draw.md b/.changeset/tricky-fans-draw.md index b6c8deca39..b0e1a5d121 100644 --- a/.changeset/tricky-fans-draw.md +++ b/.changeset/tricky-fans-draw.md @@ -1,5 +1,5 @@ --- -"@nextui-org/switch": patch +"@nextui-org/theme": patch --- -Removed right margin in wrapper (#3791) +show margin only with label in Switch component (#3791)