react-legos
Version:
A React component to render LEGO bricks
69 lines (63 loc) • 1.5 kB
JavaScript
import { configure, withOptions } from './'
function loadStories() {
require('../stories')
}
// Option defaults:
withOptions({
/**
* name to display in the top left corner
* @type {String}
*/
name: 'react-legos',
/**
* URL for name in top left corner to link to
* @type {String}
*/
url: '#',
/**
* display left panel that shows a list of stories
* @type {Boolean}
*/
showLeftPanel: true,
/**
* display horizontal panel that displays addon configurations
* @type {Boolean}
*/
showDownPanel: true,
/**
* display floating search box to search through stories
* @type {Boolean}
*/
showSearchBox: false,
/**
* show horizontal addons panel as a vertical panel on the right
* @type {Boolean}
*/
downPanelInRight: true,
/**
* sorts stories
* @type {Boolean}
*/
sortStoriesByKind: true,
/**
* regex for finding the hierarchy separator
* @example:
* null - turn off hierarchy
* /\// - split by `/`
* /\./ - split by `.`
* /\/|\./ - split by `/` or `.`
* @type {Regex}
*/
hierarchySeparator: null,
/**
* sidebar tree animations
* @type {Boolean}
*/
sidebarAnimations: true,
/**
* id to select an addon panel
* @type {String}
*/
selectedAddonPanel: undefined, // The order of addons in the "Addons Panel" is the same as you import them in 'addons.js'. The first panel will be opened by default as you run Storybook
})
configure(loadStories, module)