-
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.
feat: initial checkin controls panel
- Loading branch information
1 parent
d8ba649
commit 9a69eb4
Showing
7 changed files
with
21 additions
and
5 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 |
---|---|---|
@@ -1,2 +1 @@ | ||
export const ADDON_ID = 'storybook/page'; | ||
export const PANEL_ID = `${ADDON_ID}/panel`; | ||
export const ADDON_ID = 'controls/page'; |
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 @@ | ||
export const ADDON_ID = 'controls/panel'; | ||
export const PANEL_ID = 'controls/panel/panel'; |
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 { ControlsTable } from './blocks/ControlsTable'; | ||
import { ADDON_ID, PANEL_ID } from './panel/constants'; | ||
|
||
addons.register(ADDON_ID, api => { | ||
addons.addPanel(PANEL_ID, { | ||
title: 'Controls', | ||
render: ({ active, key }) => ( | ||
<ControlsTable id="." api={api} key={key} active={active} /> | ||
), | ||
}); | ||
}); |
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