File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
compass-aggregations/src/components
compass-components/src/components/actions Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ const containerStyles = css({
1414 flex : 'none' ,
1515} ) ;
1616
17+ const defaultTitle = 'Output Options' ;
18+
1719export const PipelineOutputOptionsMenu : React . FunctionComponent < {
1820 onChangeOption : ( option : PipelineOutputOption ) => void ;
1921 buttonText ?: string ;
@@ -24,11 +26,11 @@ export const PipelineOutputOptionsMenu: React.FunctionComponent<{
2426 data-testid = "pipeline-output-options"
2527 actions = { pipelineOptionsActions }
2628 onAction = { onChangeOption }
27- buttonText = { buttonText ?? 'Output Options' }
29+ buttonText = { buttonText ?? defaultTitle }
2830 buttonProps = { {
2931 size : 'xsmall' ,
30- title : buttonText ?? 'Output Options' ,
31- [ 'aria-label' ] : buttonText ?? 'Output Options' ,
32+ title : buttonText || defaultTitle ,
33+ [ 'aria-label' ] : buttonText || defaultTitle ,
3234 } }
3335 > </ DropdownMenuButton >
3436 </ div >
Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ export function DropdownMenuButton<Action extends string>({
122122 data-testid = { actionTestId ( dataTestId , action ) }
123123 data-action = { action }
124124 data-menuitem = { true }
125- glyph = { < ActionGlyph glyph = { icon } size = { iconSize } /> }
125+ glyph = {
126+ icon ? < ActionGlyph glyph = { icon } size = { iconSize } /> : undefined
127+ }
126128 onClick = { onClick }
127129 >
128130 { label }
You can’t perform that action at this time.
0 commit comments