Skip to content

Commit 9f7aca0

Browse files
committed
Add input stories
1 parent a9df592 commit 9f7aca0

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

frontend/.storybook/preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ import "../src/styles.scss";
77

88
export const parameters = {
99
actions: { argTypesRegex: "^on[A-Z].*" },
10+
controls: { expanded: true }
1011
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { ReactiveFormsModule } from '@angular/forms';
2+
import { Meta, Story } from '@storybook/angular';
3+
import { moduleMetadata } from '@storybook/angular';
4+
import { InputComponent } from './input.component';
5+
6+
export default {
7+
title: 'Components/Input',
8+
component: InputComponent,
9+
decorators: [
10+
moduleMetadata({
11+
imports: [ReactiveFormsModule],
12+
declarations: [InputComponent]
13+
})
14+
],
15+
argTypes: {
16+
placeholder: {
17+
control: 'text'
18+
}
19+
}
20+
} as Meta;
21+
22+
const Template: Story<InputComponent> = (args: InputComponent) => ({
23+
component: InputComponent,
24+
props: args
25+
});
26+
27+
export const Flat: Story<InputComponent> = Template.bind({});
28+
Flat.args = {
29+
containerClassName: 'flat text-textMedium',
30+
placeholder: 'Search'
31+
};

0 commit comments

Comments
 (0)