From 393219a5161e39a58437180464025ba0d8f02226 Mon Sep 17 00:00:00 2001 From: Daniel Maslowski Date: Tue, 20 Aug 2024 17:29:42 +0200 Subject: [PATCH] DTNode: add Storybook story --- app/DTNode.stories.tsx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 app/DTNode.stories.tsx diff --git a/app/DTNode.stories.tsx b/app/DTNode.stories.tsx new file mode 100644 index 0000000..1b12cf8 --- /dev/null +++ b/app/DTNode.stories.tsx @@ -0,0 +1,38 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { fn } from '@storybook/test'; +import { DataNode } from './DTNode'; + +const meta = { + title: 'App/DTNode', + component: DataNode, + argTypes: { + data: { + label: { control: 'text' }, + baseAddr: {}, + compat: {}, + }, + status: { control: 'radio', options: ['okay', 'disabled'] }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Simple: Story = { + args: { + data: { + label: "UART", + baseAddr: "0x0c00_0000", + }, + status: "okay", + }, +}; + +export const WithCompat: Story = { + args: { + data: { + label: "firmware", + compat: "raspberrypi,bcm2835-firmware", + }, + }, +};