Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Refactor snippets

Co-authored-by: Michael Taranto <[email protected]>
  • Loading branch information
felixhabib and michaeltaranto authored Dec 23, 2024
1 parent 7001a76 commit cfba997
Showing 1 changed file with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ export const snippets: Snippets = [
<MenuRenderer
offsetSpace="small"
trigger={(triggerProps) => (
<Box userSelect="none" cursor="pointer" {...triggerProps}>
<ButtonIcon
icon={<IconList />}
id="buttonicon-menurenderer"
label="Menu"
/>
</Box>
<ButtonIcon
icon={<IconList />}
id="buttonicon-menurenderer"
label="Menu"
{...triggerProps}
/>
)}
>
<MenuItem onClick={() => {}}>Button</MenuItem>
Expand All @@ -85,14 +84,13 @@ export const snippets: Snippets = [
size="small"
offsetSpace="xxsmall"
trigger={(triggerProps) => (
<Box userSelect="none" cursor="pointer" {...triggerProps}>
<ButtonIcon
size="small"
icon={<IconList />}
id="buttonicon-menurenderer"
label="Menu"
/>
</Box>
<ButtonIcon
size="small"
icon={<IconList />}
id="buttonicon-menurenderer"
label="Menu"
{...triggerProps}
/>
)}
>
<MenuItem onClick={() => {}}>Button</MenuItem>
Expand All @@ -104,8 +102,7 @@ export const snippets: Snippets = [
name: 'Placeholder trigger',
code: source(
<MenuRenderer
size="small"
offsetSpace="xsmall"
offsetSpace="small"
trigger={(triggerProps) => (
<Box userSelect="none" cursor="pointer" {...triggerProps}>
<Placeholder height={50} label="Menu Trigger" />
Expand Down

0 comments on commit cfba997

Please sign in to comment.