Storybook: A little bit of organization

This commit is contained in:
Scott Nonnenberg 2020-08-27 19:11:24 -07:00 committed by Josh Perez
parent f5a3fdb174
commit 035f704b07
4 changed files with 10 additions and 10 deletions

View file

@ -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);

View file

@ -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={{

View file

@ -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

View file

@ -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 = {