Storybook: A little bit of organization
This commit is contained in:
parent
f5a3fdb174
commit
035f704b07
4 changed files with 10 additions and 10 deletions
|
@ -124,13 +124,6 @@ addDecorator(Story => <Story />);
|
|||
addDecorator(story => <I18n messages={messages}>{story()}</I18n>);
|
||||
|
||||
configure(() => {
|
||||
// Load sticker creator stories
|
||||
const stickerCreatorContext = require.context(
|
||||
'../sticker-creator',
|
||||
true,
|
||||
/\.stories\.tsx?$/
|
||||
);
|
||||
stickerCreatorContext.keys().forEach(f => stickerCreatorContext(f));
|
||||
// Load main app stories
|
||||
const tsComponentsContext = require.context(
|
||||
'../ts/components',
|
||||
|
@ -138,4 +131,11 @@ configure(() => {
|
|||
/\.stories.tsx?$/
|
||||
);
|
||||
tsComponentsContext.keys().forEach(f => tsComponentsContext(f));
|
||||
// Load sticker creator stories
|
||||
const stickerCreatorContext = require.context(
|
||||
'../sticker-creator',
|
||||
true,
|
||||
/\.stories\.tsx?$/
|
||||
);
|
||||
stickerCreatorContext.keys().forEach(f => stickerCreatorContext(f));
|
||||
}, module);
|
||||
|
|
|
@ -11,7 +11,7 @@ import { EmojiButton } from './EmojiButton';
|
|||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
storiesOf('Components/emojis/EmojiButton', module).add('Base', () => {
|
||||
storiesOf('Components/Emoji/EmojiButton', module).add('Base', () => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
|
|
|
@ -11,7 +11,7 @@ import { EmojiPicker } from './EmojiPicker';
|
|||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
storiesOf('Components/emojis/EmojiPicker', module)
|
||||
storiesOf('Components/Emoji/EmojiPicker', module)
|
||||
.add('Base', () => {
|
||||
return (
|
||||
<EmojiPicker
|
||||
|
|
|
@ -16,7 +16,7 @@ import { action } from '@storybook/addon-actions';
|
|||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
storiesOf('stickers', module).add('StickerPreviewModal', () => {
|
||||
storiesOf('Components/Stickers/StickerPreviewModal', module).add('Full', () => {
|
||||
const title = text('title', 'Foo');
|
||||
const author = text('author', 'Foo McBarrington');
|
||||
const abeSticker = {
|
||||
|
|
Loading…
Reference in a new issue