\`,
+ moduleMetadata: {
+ declarations: [WithNgContentComponent],
+ },
+}));
+"
+`;
+
+exports[`inject-decorator injectDecorator option is false - ts does not inject stories decorator after the all "storiesOf" functions 1`] = `
+"import { Component } from '@angular/core';
+import { Store, StoreModule } from '@ngrx/store';
+import { storiesOf, moduleMetadata } from '@storybook/angular';
+
+@Component({
+ selector: 'storybook-comp-with-store',
+ template: '
{{this.getSotreState()}}
',
+})
+class WithStoreComponent {
+ private store: Store;
+
+ constructor(store: Store) {
+ this.store = store;
+ }
+
+ getSotreState(): string {
+ return this.store === undefined ? 'Store is NOT injected' : 'Store is injected';
+ }
+}
+
+storiesOf('ngrx|Store', module)
+ .addDecorator(
+ moduleMetadata({
+ imports: [StoreModule.forRoot({})],
+ declarations: [WithStoreComponent],
+ })
+ )
+ .add('With component', () => {
+ return {
+ component: WithStoreComponent,
+ };
+ });"
+`;
+
+exports[`inject-decorator injectDecorator option is false does not inject stories decorator after the all "storiesOf" functions 1`] = `
+"import React from 'react';
+import { storiesOf } from '@storybook/react';
+import { withInfo } from '@storybook/addon-info';
+import { action } from '@storybook/addon-actions';
+
+import DocgenButton from '../components/DocgenButton';
+import FlowTypeButton from '../components/FlowTypeButton';
+import BaseButton from '../components/BaseButton';
+import TableComponent from '../components/TableComponent';
+
+storiesOf('Addons|Info.React Docgen', module)
+ .add(
+ 'Comments from PropType declarations',
+ withInfo(
+ 'Comments above the PropType declarations should be extracted from the React component file itself and rendered in the Info Addon prop table'
+ )(() => )
+ )
+ .add(
+ 'Comments from Flow declarations',
+ withInfo(
+ 'Comments above the Flow declarations should be extracted from the React component file itself and rendered in the Info Addon prop table'
+ )(() => )
+ )
+ .add(
+ 'Comments from component declaration',
+ withInfo(
+ 'Comments above the component declaration should be extracted from the React component file itself and rendered below the Info Addon heading'
+ )(() => )
+ );
+
+const markdownDescription = \`
+#### You can use markdown in your withInfo() description.
+
+Sometimes you might want to manually include some code examples:
+~~~js
+const Button = () => ;
+~~~
+
+Maybe include a [link](http://storybook.js.org) to your project as well.
+\`;
+
+storiesOf('Addons|Info.Markdown', module).add(
+ 'Displays Markdown in description',
+ withInfo(markdownDescription)(() => )
+);
+
+storiesOf('Addons|Info.Options.inline', module).add(
+ 'Inlines component inside story',
+ withInfo({
+ text: 'Component should be inlined between description and PropType table',
+ inline: true, // Displays info inline vs click button to view
+ })(() => )
+);
+
+storiesOf('Addons|Info.Options.header', module).add(
+ 'Shows or hides Info Addon header',
+ withInfo({
+ text: 'The Info Addon header should be hidden',
+ header: false, // Toggles display of header with component name and description
+ })(() => )
+);
+
+storiesOf('Addons|Info.Options.source', module).add(
+ 'Shows or hides Info Addon source',
+ withInfo({
+ text: 'The Info Addon source section should be hidden',
+ source: false, // Displays the source of story Component
+ })(() => )
+);
+
+storiesOf('Addons|Info.Options.propTables', module).add(
+ 'Shows additional component prop tables',
+ withInfo({
+ text: 'There should be a prop table added for a component not included in the story',
+ propTables: [FlowTypeButton],
+ })(() => )
+);
+
+storiesOf('Addons|Info.Options.propTablesExclude', module).add(
+ 'Exclude component from prop tables',
+ withInfo({
+ text: 'This can exclude extraneous components from being displayed in prop tables.',
+ propTablesExclude: [FlowTypeButton],
+ })(() => (
+
+
+
+
+ ))
+);
+
+storiesOf('Addons|Info.Options.styles', module)
+ .add(
+ 'Extend info styles with an object',
+ withInfo({
+ styles: {
+ button: {
+ base: {
+ background: 'purple',
+ },
+ },
+ header: {
+ h1: {
+ color: 'green',
+ },
+ },
+ },
+ })(() => )
+ )
+ .add(
+ 'Full control over styles using a function',
+ withInfo({
+ styles: stylesheet => ({
+ ...stylesheet,
+ header: {
+ ...stylesheet.header,
+ h1: {
+ ...stylesheet.header.h1,
+ color: 'red',
+ },
+ },
+ }),
+ })(() => )
+ );
+
+storiesOf('Addons|Info.Options.TableComponent', module).add(
+ 'Use a custom component for the table',
+ withInfo({
+ TableComponent,
+ })(() => )
+);
+
+storiesOf('Addons|Info.Decorator', module)
+ .addDecorator((story, context) =>
+ withInfo('Info could be used as a global or local decorator as well.')(story)(context)
+ )
+ .add('Use Info as story decorator', () => );
+
+const hoc = WrapComponent => ({ ...props }) => ;
+
+const Input = hoc(() => );
+
+const TextArea = hoc(({ children }) => );
+
+storiesOf('Addons|Info.GitHub issues', module).add(
+ '#1814',
+ withInfo('Allow Duplicate DisplayNames for HOC #1814')(() => (
+