Skip to content

Commit 77c9bb3

Browse files
authored
docs: storybook default landing page to introduction (#1056)
1 parent 10a0b16 commit 77c9bb3

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22

33
module.exports = {
4-
stories: ['../src/**/*.(stories|visual).(js|mdx)'],
4+
stories: ['../src/Docs/introduction.stories.mdx', '../src/**/*.(stories|visual).js'],
55

66
addons: [
77
'@storybook/addon-knobs/register',

.storybook/preview.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,8 @@ import { DocsContainer } from '@storybook/addon-docs/blocks';
99
import DocsPage from './custom/components/DocsPage';
1010
import { addDecorator, addParameters } from '@storybook/react';
1111

12-
// Order of folders to display
13-
const headers = [
14-
'Introduction',
15-
'Component API'
16-
];
17-
18-
const storySort = (a, b) => {
19-
const aHeader = a[1].kind.substr(0, a[1].kind.indexOf('/'));
20-
const bHeader = b[1].kind.substr(0, b[1].kind.indexOf('/'));
21-
22-
if (aHeader !== bHeader) {
23-
const aHeaderIndex = headers.findIndex(h => h === aHeader);
24-
const bHeaderIndex = headers.findIndex(h => h === bHeader);
25-
return aHeaderIndex - bHeaderIndex;
26-
}
27-
return 0;
28-
};
29-
3012
addParameters({
3113
options: {
32-
storySort,
3314
showRoots: true,
3415
theme: fundamentals
3516
},

0 commit comments

Comments
 (0)