import { centered } from '@storybook/addon-centered/angular' ; import { moduleMetadata , storiesOf } from '@storybook/angular' ; import { ButtonComponent } from '../app/button.component' ; import { AppComponent } from '../app/app.component' ; storiesOf ( 'Addon|Centered' , module ) . addDecorator ( centered ) . add ( 'centered component' , ( ) => ( { component : AppComponent , props : { } } ) ) ; storiesOf ( 'Addon|Centered' , module ) . addDecorator ( moduleMetadata ( { declarations : [ ButtonComponent ] } ) ) . addDecorator ( centered ) . add ( 'centered template' , ( ) => ( { template : `<storybook-button-component [text]="text" (onClick)="onClick($event)"></storybook-button-component>` , props : { text : 'Hello Button' , onClick : ( event ) => { console . log ( 'some bindings work' ) ; console . log ( event ) ; } } } ) ) ;