Created
February 10, 2020 04:20
-
-
Save IntegerMan/8475e494dc2744e03a36dc3147e436fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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