-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26200 from storybookjs/kasper/empty-controls
Docs: Don't show empty arg tables in doc pages
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import type { ControlsParameters } from './ControlsParameters'; | ||
import React from 'react'; | ||
|
||
const meta = { | ||
title: 'examples/Empty ArgTypes for Control blocks', | ||
// note that component is not specified, so no argtypes can be generated | ||
render: () => <div>I am a story without args or argTypes</div>, | ||
parameters: { chromatic: { disableSnapshot: true } }, | ||
} satisfies Meta<typeof ControlsParameters>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
/** | ||
* There are no argTypes or args, so this story won't show any controls in the docs page. | ||
* In the control addon it will show a UI how to set up controls. | ||
*/ | ||
export const Default: Story = {}; |