refactor(angular): move ControlValueAccessor example in Basics / Angular forms

This commit is contained in:
ThibaudAv 2021-02-06 12:35:53 +01:00
parent 643fcf7085
commit e366cab513
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Storyshots Custom/ngModel custom ControlValueAccessor 1`] = `
exports[`Storyshots Basics / Angular forms / ControlValueAccessor Simple input 1`] = `
<storybook-wrapper>
<storybook-custom-cva-component>
<div>

View File

@ -1,23 +1,23 @@
import { FormsModule } from '@angular/forms';
import { action } from '@storybook/addon-actions';
import { moduleMetadata } from '@storybook/angular';
import { moduleMetadata, Meta, Story } from '@storybook/angular';
import { CustomCvaComponent } from './custom-cva.component';
export default {
title: 'Custom/ngModel',
title: 'Basics / Angular forms / ControlValueAccessor',
component: CustomCvaComponent,
decorators: [
moduleMetadata({
imports: [FormsModule],
}),
],
};
} as Meta;
export const CustomControlValueAccessor = () => ({
export const SimpleInput: Story = () => ({
props: {
ngModel: 'Type anything',
ngModelChange: action('ngModelChange'),
},
});
CustomControlValueAccessor.storyName = 'custom ControlValueAccessor';
SimpleInput.storyName = 'Simple input';