Skip to content

Commit

Permalink
Merge pull request #88 from ComponentDriven/next
Browse files Browse the repository at this point in the history
Release 0.1.5
  • Loading branch information
kasperpeulen authored Apr 25, 2024
2 parents 23656a2 + 0b5eef2 commit 5594109
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/story.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ const strict: XMeta<ButtonArgs> = {
argTypes: { x: { type: { name: 'string' } } },
};

const options = ['foo', 'bar'] as const;
const simpleWithReadonlyOptions: XMeta<ButtonArgs> = {
title: 'simple',
component: Button,
tags: ['foo', 'bar'],
decorators: [(storyFn, context) => `withDecorator(${storyFn(context)})`],
parameters: { a: () => null, b: NaN, c: Symbol('symbol') },
loaders: [() => Promise.resolve({ d: '3' })],
args: { x: '1' },
argTypes: {
x: {
control: {
type: 'select',
},
options,
},
},
};

// NOTE Various story usages
const Simple: XStory = () => 'Simple';

Expand Down
2 changes: 1 addition & 1 deletion src/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export interface InputType {
/**
* @see https://storybook.js.org/docs/api/arg-types#options
*/
options?: any[];
options?: readonly any[];
/**
* @see https://storybook.js.org/docs/api/arg-types#table
*/
Expand Down

0 comments on commit 5594109

Please sign in to comment.