Skip to content

Commit

Permalink
more diff reduction
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
  • Loading branch information
Anton Gilgur committed Aug 22, 2024
1 parent e6e2da1 commit 166bc0a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
4 changes: 2 additions & 2 deletions stories/dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Menu = () => {
<li><a>menu item 2</a></li>
</ul>
</DropDown>
)
);
};
Menu.storyName = 'menu';

Expand All @@ -28,6 +28,6 @@ export const MenuWrapper = () => {
title: 'menu item 1',
action: () => window.alert('Clicked!'),
}]} />
)
);
};
MenuWrapper.storyName = 'menu wrapper';
36 changes: 19 additions & 17 deletions stories/forms.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ export default {
title: 'Forms',
};

export const Default = () => (
<Form>
{(api) => (
<form style={{padding: '1em'}}>
<div className='argo-form-row'>
<FormField label='Textbox' formApi={api} field='textField' component={Text} />
</div>
<div className='argo-form-row'>
<FormField label='Password' formApi={api} field='passwordField' component={Text} componentProps={{type: 'password'}} />
</div>
<div className='argo-form-row'>
<FormField label='Select' formApi={api} field='selectField' component={FormSelect} componentProps={{options: ['option1', 'option2']}} />
</div>
</form>
)}
</Form>
);
export const Default = () => {
return (
<Form>
{(api) => (
<form style={{padding: '1em'}}>
<div className='argo-form-row'>
<FormField label='Textbox' formApi={api} field='textField' component={Text} />
</div>
<div className='argo-form-row'>
<FormField label='Password' formApi={api} field='passwordField' component={Text} componentProps={{type: 'password'}} />
</div>
<div className='argo-form-row'>
<FormField label='Select' formApi={api} field='selectField' component={FormSelect} componentProps={{options: ['option1', 'option2']}} />
</div>
</form>
)}
</Form>
);
};
Default.storyName = 'default';
20 changes: 10 additions & 10 deletions stories/logs-viewer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export default {
};

export const Default = () => (
<div>
<LogsViewer source={{
key: 'test',
loadLogs: () => new Observable<string>((observer) => {
const interval = setInterval(() => observer.next('test\n'), 1000);
return () => clearInterval(interval);
}),
shouldRepeat: () => false,
}}/>
</div>
<div>
<LogsViewer source={{
key: 'test',
loadLogs: () => new Observable<string>((observer) => {
const interval = setInterval(() => observer.next('test\n'), 1000);
return () => clearInterval(interval);
}),
shouldRepeat: () => false,
}}/>
</div>
);
Default.storyName = 'default';

0 comments on commit 166bc0a

Please sign in to comment.