Skip to content

Commit

Permalink
DTNode: add Storybook story
Browse files Browse the repository at this point in the history
  • Loading branch information
orangecms committed Aug 21, 2024
1 parent 2907d6e commit 393219a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions app/DTNode.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<typeof DataNode>;

export default meta;
type Story = StoryObj<typeof meta>;

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",
},
},
};

0 comments on commit 393219a

Please sign in to comment.