-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid re-emitting docgen for re-exported components (#9)
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 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
31 changes: 31 additions & 0 deletions
31
sandboxes/react-rsbuild/src/stories/ReExportButton.stories.ts
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,31 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { fn } from '@storybook/test' | ||
import ReExportButton from './ReExportButton' | ||
|
||
const meta: Meta<typeof ReExportButton> = { | ||
title: 'Example/Re-export Button', | ||
component: ReExportButton, | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: | ||
'This story exists to show that re-exporting a component with a different name does not cause problems.', | ||
}, | ||
}, | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
args: { onClick: fn() }, | ||
} | ||
|
||
export default meta | ||
|
||
export const Primary: StoryObj<typeof meta> = { | ||
args: { | ||
primary: true, | ||
label: 'Button', | ||
}, | ||
} |
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,2 @@ | ||
import { Button as ReExportButton } from './Button' | ||
export default ReExportButton |