Skip to content

Instantly share code, notes, and snippets.

Embed
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 ]}))
.addDecorator(withKnobs)
.add('Configurable', () => ({
component: StoryEntryComponent,
props: {
Entry: new StoryEntry(select<StoryEntryType>('Type',
{Error: StoryEntryType.CommandError,
System: StoryEntryType.SystemText,
Narrative: StoryEntryType.StoryNarrative,
Command: StoryEntryType.PlayerCommand},
StoryEntryType.SystemText),
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
You can’t perform that action at this time.