-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 #30179 from storybookjs/larsrickert/code-panel-imp…
…rovements Addon-docs: Consider custom code snippet in story code panel and update styles
- Loading branch information
Showing
4 changed files
with
64 additions
and
33 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
32 changes: 32 additions & 0 deletions
32
code/addons/docs/template/stories/codePanel/index.stories.tsx
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,32 @@ | ||
export default { | ||
component: globalThis.Components.Button, | ||
tags: ['autodocs'], | ||
parameters: { | ||
chromatic: { disable: true }, | ||
docs: { | ||
codePanel: true, | ||
}, | ||
}, | ||
}; | ||
|
||
export const Default = { args: { label: 'Default' } }; | ||
|
||
export const CustomCode = { | ||
args: { label: 'Custom code' }, | ||
parameters: { | ||
docs: { | ||
source: { | ||
code: '<button>Custom code</button>', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export const WithoutPanel = { | ||
args: { label: 'Without panel' }, | ||
parameters: { | ||
docs: { | ||
codePanel: false, | ||
}, | ||
}, | ||
}; |
23 changes: 0 additions & 23 deletions
23
code/addons/docs/template/stories/sourcePanel/index.stories.tsx
This file was deleted.
Oops, something went wrong.
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