From 3789f07efff68f4c586177426d2279dd06f67ae2 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Tue, 27 Jan 2026 10:43:31 +0800 Subject: [PATCH] presentation selector support toggle --- .../PresentationSelector.stories.ts | 13 ++++++ .../src/components/PresentationSelector.vue | 41 ++++++++++++------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/next-ui/src/components/PresentationSelector.stories.ts b/next-ui/src/components/PresentationSelector.stories.ts index 3861f090..8d7f592f 100644 --- a/next-ui/src/components/PresentationSelector.stories.ts +++ b/next-ui/src/components/PresentationSelector.stories.ts @@ -34,6 +34,12 @@ export const Default: Story = { args: {}, } +export const Toggle: Story = { + args: { + toggle: true, + }, +} + export const Clicked: Story = { tags: ['!autodocs'], args: {}, @@ -54,3 +60,10 @@ export const LimitedSet: Story = { await userEvent.click(canvas.getByRole('button')) }, } + +export const LimitedSetToggle: Story = { + args: { + modes: ['grid', 'list'], + toggle: true, + }, +} diff --git a/next-ui/src/components/PresentationSelector.vue b/next-ui/src/components/PresentationSelector.vue index 93457cde..7a48fe0a 100644 --- a/next-ui/src/components/PresentationSelector.vue +++ b/next-ui/src/components/PresentationSelector.vue @@ -1,19 +1,22 @@