From 12b94c4c45878b39396f5c0b062dec88d574310e Mon Sep 17 00:00:00 2001
From: Simon Jockers <449739+sjockers@users.noreply.github.com>
Date: Wed, 4 Feb 2026 14:07:16 +0100
Subject: [PATCH 1/5] Add `forceRow` option, preventing wrapping on small
screens
---
.../src/Switcher/Switcher.stories.svelte | 17 +++++++++
components/src/Switcher/Switcher.svelte | 36 +++++++++++++++----
2 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/components/src/Switcher/Switcher.stories.svelte b/components/src/Switcher/Switcher.stories.svelte
index 1fbb77e9..a6c534a2 100644
--- a/components/src/Switcher/Switcher.stories.svelte
+++ b/components/src/Switcher/Switcher.stories.svelte
@@ -57,6 +57,23 @@
+ {
+ const canvas = within(canvasElement);
+ console.log(canvas);
+ await step('Options are displayed in a row', async () => {
+ const list = canvas.getByRole('list');
+ expect(list.classList).toContain('force-row');
+ });
+ }}
+>
+
+
+
+
+
{label}
-
+
{#each options as o (o)}
-
{
const canvas = within(canvasElement);
console.log(canvas);
await step('Options are displayed in a row', async () => {
const list = canvas.getByRole('list');
- expect(list.classList).toContain('force-row');
+ expect(list.classList).toContain('layout-row');
});
}}
>
-
+
+ {
+ const canvas = within(canvasElement);
+ console.log(canvas);
+ await step('Options are displayed in a row', async () => {
+ const list = canvas.getByRole('list');
+ expect(list.classList).toContain('layout-column');
+ });
+ }}
+>
+
+
+
+
{label}
-
+
{#each options as o (o)}
-