Skip to content

Commit 6dd5eee

Browse files
authored
Next: Switch component QA feedback patch (#2705)
1 parent 0ba4e9c commit 6dd5eee

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/skeleton-react/src/lib/components/Switch/Switch.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const Switch: React.FC<SwitchProps> = ({
4444
}) => {
4545
// Set Compact Mode
4646
if (compact) {
47-
base = `${thumbBase} aspect-square`;
47+
base = thumbBase;
4848
// Removes the height class
4949
height = "";
5050
// Thumb inherits track styles

packages/skeleton-svelte/src/lib/components/Switch/Switch.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
4444
// Set Compact Mode
4545
if (compact) {
46-
base = `${thumbBase} aspect-square`;
46+
base = thumbBase;
4747
// Removes the height class
4848
height = '';
4949
// Thumb inherits track styles

sites/next.skeleton.dev/src/content/docs/components/switch/meta.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Switch
33
description: A control for toggling between checked states.
44
srcSvelte: '/src/lib/components/Switch'
5-
srcReact: '/src/components/Switch'
5+
srcReact: '/src/lib/components/Switch'
66
srcAlly: 'https://www.w3.org/WAI/ARIA/apg/patterns/switch/'
77
showDocsUrl: true
88
---

sites/next.skeleton.dev/src/examples/components/switch/Example.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
let state = $state(false);
66
</script>
77

8-
<Switch id="example" name="example" bind:checked={state} onCheckedChange={() => console.log({ state })} />
8+
<Switch id="example" name="example" bind:checked={state} onCheckedChange={console.log} />

0 commit comments

Comments
 (0)