Skip to content

Commit 393219a

Browse files
committed
DTNode: add Storybook story
1 parent 2907d6e commit 393219a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

app/DTNode.stories.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import type { Meta, StoryObj } from '@storybook/react';
2+
import { fn } from '@storybook/test';
3+
import { DataNode } from './DTNode';
4+
5+
const meta = {
6+
title: 'App/DTNode',
7+
component: DataNode,
8+
argTypes: {
9+
data: {
10+
label: { control: 'text' },
11+
baseAddr: {},
12+
compat: {},
13+
},
14+
status: { control: 'radio', options: ['okay', 'disabled'] },
15+
},
16+
} satisfies Meta<typeof DataNode>;
17+
18+
export default meta;
19+
type Story = StoryObj<typeof meta>;
20+
21+
export const Simple: Story = {
22+
args: {
23+
data: {
24+
label: "UART",
25+
baseAddr: "0x0c00_0000",
26+
},
27+
status: "okay",
28+
},
29+
};
30+
31+
export const WithCompat: Story = {
32+
args: {
33+
data: {
34+
label: "firmware",
35+
compat: "raspberrypi,bcm2835-firmware",
36+
},
37+
},
38+
};

0 commit comments

Comments
 (0)