[Glitch] Improve Redux Storybook

Port 8c2845906c1f8f60708dad452b056bc7696c1224 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo 2025-12-16 12:27:18 +01:00 committed by Claire
parent 3cd033df0c
commit 177479fe37

View File

@ -4,20 +4,22 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
import { Emoji } from './index';
type EmojiProps = ComponentProps<typeof Emoji> & { state: string };
type EmojiProps = ComponentProps<typeof Emoji> & {
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) {