Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2020 04:20
What would you like to do?
import {select, text, withKnobs} from '@storybook/addon-knobs';
import {moduleMetadata, storiesOf} from '@storybook/angular';
import {StoryEntry} from '../../Model/StoryEntry';
import {StoryEntryType} from '../../Model/StoryEntryType';
import {AppModule} from '../app.module';
import {StoryEntryComponent} from './story-entry.component';
storiesOf('StoryEntry', module)
.addDecorator(moduleMetadata({ imports: [ AppModule ]}))
.add('Configurable', () => ({
component: StoryEntryComponent,
props: {
Entry: new StoryEntry(select<StoryEntryType>('Type',
{Error: StoryEntryType.CommandError,
System: StoryEntryType.SystemText,
Narrative: StoryEntryType.StoryNarrative,
Command: StoryEntryType.PlayerCommand},
text('Text', 'This is the text of the entry'))
})); // Note: non-configurable stories omitted for brevity / focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment