-
-
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 #11368 from storybookjs/9773-inconsistent-paths
Core: Consistent file paths for locally-defined addons
- Loading branch information
Showing
6 changed files
with
124 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
managerEntries: [], | ||
}; |
15 changes: 15 additions & 0 deletions
15
examples/cra-ts-kitchen-sink/.storybook/localAddon/register.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,15 @@ | ||
import React from 'react'; | ||
import addons, { types } from '@storybook/addons'; | ||
|
||
const ID = 'local-addon'; | ||
|
||
const LocalAddonPanel = () => <>Local addon</>; | ||
|
||
addons.register(ID, (api) => | ||
addons.add(ID, { | ||
title: ID, | ||
type: types.PANEL, | ||
match: () => true, | ||
render: ({ active, key }) => (active ? <LocalAddonPanel key={key} /> : null), | ||
}) | ||
); |
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