-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show story add-on tab by default #171
- Loading branch information
Showing
4 changed files
with
55 additions
and
95 deletions.
There are no files selected for viewing
25 changes: 12 additions & 13 deletions
25
storybook/.storybook/main.cjs → storybook/.storybook/main.js
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,71 +1,14 @@ | ||
import { addParameters } from '@storybook/react'; | ||
|
||
// Option defaults: | ||
addParameters({ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
options: { | ||
/** | ||
* show story component as full screen | ||
* @type {Boolean} | ||
*/ | ||
isFullscreen: false, | ||
/** | ||
* display panel that shows a list of stories | ||
* @type {Boolean} | ||
*/ | ||
showNav: true, | ||
/** | ||
* display panel that shows addon configurations | ||
* @type {Boolean} | ||
*/ | ||
showPanel: false, | ||
/** | ||
* where to show the addon panel | ||
* @type {('bottom'|'right')} | ||
*/ | ||
panelPosition: 'bottom', | ||
/** | ||
* regex for finding the hierarchy separator | ||
* @example: | ||
* null - turn off hierarchy | ||
* /\// - split by `/` | ||
* /\./ - split by `.` | ||
* /\/|\./ - split by `/` or `.` | ||
* @type {Regex} | ||
*/ | ||
hierarchySeparator: /\/|\./, | ||
/** | ||
* regex for finding the hierarchy root separator | ||
* @example: | ||
* null - turn off multiple hierarchy roots | ||
* /\|/ - split by `|` | ||
* @type {Regex} | ||
*/ | ||
hierarchyRootSeparator: /\|/, | ||
/** | ||
* sidebar tree animations | ||
* @type {Boolean} | ||
*/ | ||
sidebarAnimations: true, | ||
/** | ||
* enable/disable shortcuts | ||
* @type {Boolean} | ||
*/ | ||
enableShortcuts: true, | ||
/** | ||
* show/hide tool bar | ||
* @type {Boolean} | ||
*/ | ||
isToolshown: true, | ||
/** | ||
* theme storybook, see link below | ||
*/ | ||
theme: undefined, | ||
|
||
/** | ||
* custom sorting (custom properties are not available) | ||
*/ | ||
storySort: (a, b) => { | ||
return a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, { numeric: true }); | ||
} | ||
return a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, { numeric: 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