Skip to content

Commit

Permalink
chore: reuse stylings #1887
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-mihok committed Apr 18, 2023
1 parent 60cc012 commit 30f0121
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ui/src/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { cssVar, formItemWidth, padding } from './theme'
import { Command, toCommands } from './toolbar'
import { XToolTip } from './tooltip'
import { wave } from './ui'
import { fixMenuOverflowStyles } from './parts/utils'

/**
* Create a button.
Expand Down Expand Up @@ -114,13 +115,6 @@ const
center: 'center',
between: 'space-between',
around: 'space-around',
},
// Fixes the vertical scrollbar for menu items with icons.
subComponentStyles: Partial<Fluent.IContextualMenuSubComponentStyles> = {
menuItem: {
icon: { lineHeight: 'initial' },
subMenuIcon: { lineHeight: 'initial', height: 'auto' },
}
}

const
Expand Down Expand Up @@ -171,7 +165,7 @@ const
iconProps: { iconName: icon },
menuProps: commands ? {
items: toCommands(commands),
styles: { subComponentStyles }
styles: fixMenuOverflowStyles
} : undefined,
split: !!commands
}
Expand Down

0 comments on commit 30f0121

Please sign in to comment.