Skip to content

Commit

Permalink
Replace inline styling with a css rule in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-miro committed Nov 28, 2024
1 parent 447c15d commit 7ea9248
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/react/menu/src/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const Submenus = () => {
Scrollable
</label>
</div>
<MenuWithAnchor style={scrollable ? { overflow: 'scroll', height: 100 } : undefined}>
<MenuWithAnchor className={scrollable ? scrollableMenuClass() : undefined}>
<Menu.Item className={itemClass()} onSelect={() => window.alert('undo')}>
Undo
</Menu.Item>
Expand Down Expand Up @@ -520,6 +520,11 @@ const animatedItemIndicatorClass = css({
},
});

const scrollableMenuClass = css({
overflow: 'scroll',
height: 100,
});

export const TickIcon = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -542,4 +547,5 @@ export const classes = {
itemClass,
separatorClass,
subTriggerClass,
scrollableMenuClass,
};

0 comments on commit 7ea9248

Please sign in to comment.