From 5e23c376705c52eff6eedb3664bcb758de3f3598 Mon Sep 17 00:00:00 2001 From: Daniel Duan Date: Tue, 1 Aug 2017 11:39:40 -0400 Subject: [PATCH] add short description to each addon option. --- addons/options/README.md | 54 +++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/addons/options/README.md b/addons/options/README.md index 7d5042011740..2ba893ca4aa9 100644 --- a/addons/options/README.md +++ b/addons/options/README.md @@ -35,16 +35,58 @@ Import and use the `setOptions` function in your config.js file. import * as storybook from '@storybook/react'; import { setOptions } from '@storybook/addon-options'; +// Option defaults: setOptions({ - name: 'My Storybook', - url: 'https://example.com', + /** + * string name to display in the top left corner + * @type {String} + */ + name: 'Storybook', + /** + * URL for string in top left corner to link to + * @type {String} + */ + url: '#', + /** + * show story component as full screen + * @type {Boolean} + */ goFullScreen: false, - showLeftPanel: false, - showDownPanel: false, - showSearchBox: false, + /** + * 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 search box to filter stories + * @type {Boolean} + */ + showSearchBox: true, + /** + * show horizontal addons panel as a vertical panel on the right + * @type {Boolean} + */ downPanelInRight: false, + /** + * sorts stories + * @type {Boolean} + */ sortStoriesByKind: false, - hierarchySeparator: /\//, + /** + * regex for finding the hierarchy separator + * @example: + * null - turn off hierarchy + * /\// - split by `/` + * /\./ - split by `.` + * /\/|\./ - split by `/` or `.` + * @type {Regex} + */ + hierarchySeparator: null, }); storybook.configure(() => require('./stories'), module);