From 177479fe3784f9d472ab56ed8c709ad7fb872ea3 Mon Sep 17 00:00:00 2001 From: Echo Date: Tue, 16 Dec 2025 12:27:18 +0100 Subject: [PATCH] [Glitch] Improve Redux Storybook Port 8c2845906c1f8f60708dad452b056bc7696c1224 to glitch-soc Signed-off-by: Claire --- .../glitch/components/emoji/emoji.stories.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/javascript/flavours/glitch/components/emoji/emoji.stories.tsx b/app/javascript/flavours/glitch/components/emoji/emoji.stories.tsx index d390387a03..fcc81db6c3 100644 --- a/app/javascript/flavours/glitch/components/emoji/emoji.stories.tsx +++ b/app/javascript/flavours/glitch/components/emoji/emoji.stories.tsx @@ -4,20 +4,22 @@ import type { Meta, StoryObj } from '@storybook/react-vite'; import { Emoji } from './index'; -type EmojiProps = ComponentProps & { state: string }; +type EmojiProps = ComponentProps & { + style: 'auto' | 'native' | 'twemoji'; +}; const meta = { title: 'Components/Emoji', component: Emoji, args: { code: '🖤', - state: 'auto', + style: 'auto', }, argTypes: { code: { name: 'Emoji', }, - state: { + style: { control: { type: 'select', labels: { @@ -28,11 +30,7 @@ const meta = { }, options: ['auto', 'native', 'twemoji'], name: 'Emoji Style', - mapping: { - auto: { meta: { emoji_style: 'auto' } }, - native: { meta: { emoji_style: 'native' } }, - twemoji: { meta: { emoji_style: 'twemoji' } }, - }, + reduxPath: 'meta.emoji_style', }, }, render(args) {