mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
logs messages on the story panel (#123)
* ref: https://github.com/storybooks/storybook-addon-console
This commit is contained in:
parent
974f129aad
commit
ca02af3d6a
@ -2,3 +2,4 @@
|
||||
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
import '@storybook/addon-console';
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
|
||||
import React from 'react';
|
||||
import { configure, addDecorator } from '@storybook/react';
|
||||
import { withConsole } from '@storybook/addon-console';
|
||||
|
||||
function loadStories() {
|
||||
require('stories');
|
||||
@ -16,6 +17,10 @@ const componentDecorator = (story) => (
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
// prepend the story name to log messages
|
||||
addDecorator((storyFn, context) => withConsole()(storyFn)(context));
|
||||
|
||||
addDecorator(componentDecorator);
|
||||
|
||||
configure(loadStories, module);
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
"react-bootstrap-table2": "0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-console": "^1.0.0",
|
||||
"@storybook/react": "^3.2.8",
|
||||
"react-redux": "^5.0.6",
|
||||
"redux": "^3.7.2",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user