Skip to content

Commit

Permalink
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 8db46bd commit e6e2da1
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions stories/dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ export default {
export const Default = () => (<DropDown anchor={() => <a>Click me</a>}><p>Dropdown content here</p></DropDown>);
Default.storyName = 'default';

export const Menu = () => (
<DropDown isMenu={true} anchor={() => <a>Click me</a>}>
<ul>
<li><a>menu item 1</a></li>
<li><a>menu item 2</a></li>
</ul>
</DropDown>
);
export const Menu = () => {
return (
<DropDown isMenu={true} anchor={() => <a>Click me</a>}>
<ul>
<li><a>menu item 1</a></li>
<li><a>menu item 2</a></li>
</ul>
</DropDown>
)
};
Menu.storyName = 'menu';

export const MenuWrapper = () => (
<DropDownMenu anchor={() => <a>Click me</a>} items={[{
title: 'menu item 1',
action: () => window.alert('Clicked!'),
}]} />
);
export const MenuWrapper = () => {
return (
<DropDownMenu anchor={() => <a>Click me</a>} items={[{
title: 'menu item 1',
action: () => window.alert('Clicked!'),
}]} />
)
};
MenuWrapper.storyName = 'menu wrapper';

0 comments on commit e6e2da1

Please sign in to comment.