forked from diplodoc-platform/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(storybook): add an example for DocPage component to storybook
- Loading branch information
1 parent
050f137
commit 9ac01aa
Showing
23 changed files
with
548 additions
and
183 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
|
||
/build | ||
/storybook-static | ||
/dist |
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 @@ | ||
registry=https://npm.yandex-team.ru/ |
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,25 +1,37 @@ | ||
import '../src/demo/reset-storybook.scss'; | ||
import '../styles/default.scss'; | ||
import '../styles/typography.scss'; | ||
import '../styles/themes.scss'; | ||
|
||
import React from 'react'; | ||
import {configure, addDecorator, addParameters} from '@storybook/react'; | ||
import {withKnobs} from '@storybook/addon-knobs'; | ||
import {addReadme} from 'storybook-readme'; | ||
|
||
import withTheme from '../src/demo/decorators/withTheme'; | ||
|
||
addParameters({ | ||
options: { | ||
panelPosition: 'right', | ||
theme: { | ||
brandTitle: 'Docs Components', | ||
brandUrl: 'https://github.yandex-team.ru/data-ui/docs-components', | ||
}, | ||
showPanel: true, | ||
} | ||
}); | ||
addDecorator(addReadme); | ||
addDecorator(withKnobs); | ||
addDecorator(withTheme); | ||
|
||
addDecorator((Story, context) => ( | ||
<main> | ||
<Pointerfocus/> | ||
<Story {...context}/> | ||
</main> | ||
)); | ||
|
||
configure(require.context('../src/stories', true, /\.stories.tsx?$/), module); | ||
function loadStories() { | ||
require('../src/stories/Components.stories'); | ||
} | ||
|
||
configure(loadStories, module); |
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,4 @@ | ||
module.exports = { | ||
authPolicy: 'disabled', | ||
socket: 'dist/run/server.sock', | ||
}; |
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,3 @@ | ||
module.exports = (req, res) => { | ||
res.redirect('/index.html'); | ||
}; |
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,6 @@ | ||
const Core = require('@yandex-data-ui/core'); | ||
|
||
const app = new Core({name: 'docs-components'}); | ||
module.exports = app; | ||
|
||
app.run(); |
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,3 @@ | ||
module.exports = { | ||
'GET /': 'index', | ||
}; |
Oops, something went wrong.