Commit 8c21b223 authored by Tasso Evangelista's avatar Tasso Evangelista Committed by Guilherme Gazzo

Upgrade to Storybook 5 (#184)

parent 3006c527
export { default as default } from 'preact-compat';
export * from 'preact-compat';
export { createContext } from 'preact-context';
export { forwardRef, createRef } from 'create-react-ref';
import { addDecorator, configure } from '@storybook/react';
import { checkA11y } from '@storybook/addon-a11y';
import { addDecorator, configure, addParameters } from '@storybook/react';
import { withA11y } from '@storybook/addon-a11y';
import { setConsoleOptions } from '@storybook/addon-console';
import { withOptions } from '@storybook/addon-options';
import { create } from '@storybook/theming';
addDecorator(withOptions({
name: 'RocketChat Livechat',
url: 'https://github.com/RocketChat/Rocket.Chat.Livechat',
hierarchySeparator: /\//,
hierarchyRootSeparator: /\|/,
}));
addParameters({
options: {
theme: create({
base: 'dark',
brandTitle: 'Rocket.Chat Livechat',
brandImage: 'https://rocket.chat/images/default/logo--dark.svg',
brandUrl: 'https://github.com/RocketChat/Rocket.Chat.Livechat',
}),
hierarchySeparator: /\//,
hierarchyRootSeparator: /\|/,
},
});
addDecorator(checkA11y);
addDecorator(withA11y);
setConsoleOptions({
panelExclude: [],
......
......@@ -2,16 +2,14 @@ const { ProvidePlugin } = require('webpack');
const webpackOverride = require('../webpackOverride.config');
module.exports = (baseConfig, env, config) => {
config = webpackOverride(config, env);
module.exports = ({ config, mode }) => {
config = webpackOverride(config, mode);
config.resolve.alias = Object.assign(
config.resolve.alias,
{
'React': 'preact-compat',
'react': 'preact-compat',
'react-dom': 'preact-compat',
'react': `${ __dirname }/compat.js`,
'react-dom': `${ __dirname }/compat.js`,
}
);
......
No preview for this file type
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, text, select } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import Avatar from '.';
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import Button, { Group } from '.';
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, color, text } from '@storybook/addon-knobs';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import ChatButton from '.';
......
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import Smile from 'icons/smile';
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
import FilesDropTarget from '.';
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, number, object, text } from '@storybook/addon-knobs';
import {
Form,
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, text, select } from '@storybook/addon-knobs';
import Button from '../Button';
import { PopoverContainer } from '../Popover';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, date, object, text } from '@storybook/addon-knobs';
import { avatarResolver } from '../../helpers.stories';
import Message from '.';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, number, object } from '@storybook/addon-knobs';
import { avatarResolver } from '../../helpers.stories';
import { Messages } from '.';
......
import loremIpsum from 'lorem-ipsum';
import mem from 'mem';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, number, text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import Modal from './component';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, object } from '@storybook/addon-knobs';
import Button from '../Button';
import { PopoverContainer, PopoverTrigger } from '.';
......
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, color, object, text } from '@storybook/addon-knobs';
import Footer from '../Footer';
import Menu from '../Menu';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, date } from '@storybook/addon-knobs';
import Separator from '.';
import Message from '../Message';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
import Sound from '.';
import { action } from '@storybook/addon-actions';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import StatusIndicator from '.';
......
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import Tooltip, { withTooltip } from '.';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, object, text } from '@storybook/addon-knobs';
import { avatarResolver } from '../../helpers.stories';
import TypingIndicator, { TypingDots } from '.';
......
import { action } from '@storybook/addon-actions';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { boolean, color } from '@storybook/addon-knobs';
......
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import centered from '@storybook/addon-centered/react';
import { withKnobs, color } from '@storybook/addon-knobs';
import path from 'path';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment