-
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.
- Loading branch information
1 parent
9baf531
commit 7087bb6
Showing
11 changed files
with
106 additions
and
52 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 |
---|---|---|
|
@@ -29,6 +29,7 @@ module.exports = { | |
options: { | ||
controlsPanel: true, | ||
propsPanel: true, | ||
storySourcePanel: true, | ||
} | ||
} | ||
], | ||
|
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,9 @@ | ||
import React from 'react'; | ||
import { StorySource } from '@component-controls/blocks'; | ||
import { AddonPanel, AddonPanelProps } from './AddonPanel'; | ||
|
||
export const StorySourcePanel: React.FC<AddonPanelProps> = props => ( | ||
<AddonPanel {...props}> | ||
<StorySource id="." /> | ||
</AddonPanel> | ||
); |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export const CONTROLS_PANEL_ID = 'controls/panels/controls'; | ||
export const STORYSOURCE_PANEL_ID = 'controls/panels/storysource'; | ||
export const PROPS_PANEL_ID = 'controls/panels/props'; |
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,14 @@ | ||
/* eslint-disable react/display-name */ | ||
import * as React from 'react'; | ||
import addons from '@storybook/addons'; | ||
import { StorySourcePanel } from './panel/StorySourcePanel'; | ||
import { STORYSOURCE_PANEL_ID } from './panel/constants'; | ||
|
||
addons.register(STORYSOURCE_PANEL_ID, api => { | ||
addons.addPanel(`${STORYSOURCE_PANEL_ID}_panel`, { | ||
title: 'Story source', | ||
render: ({ active, key }) => ( | ||
<StorySourcePanel key={key} active={active} api={api} /> | ||
), | ||
}); | ||
}); |
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
Oops, something went wrong.