File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,12 +75,7 @@ const BasicTemplate: Story<MenuProps> = args => {
7575 onClose = { ( ) => setPopoverActive ( false ) }
7676 >
7777 < Popover . Pane >
78- < Menu
79- { ...args }
80- title = "Basic Menu"
81- onChange = { setSelected }
82- selectedValues = { selected }
83- />
78+ < Menu { ...args } onChange = { setSelected } selectedValues = { selected } />
8479 </ Popover . Pane >
8580 </ Popover >
8681 ) ;
@@ -90,4 +85,5 @@ export const Basic = BasicTemplate.bind({});
9085
9186Basic . args = {
9287 options,
88+ title : 'Basic Menu' ,
9389} ;
Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ export const Menu = ({
3535
3636 return (
3737 < StyledMenu id = { menuId } >
38- < TitleContainer >
39- < Typography variant = "subtitle2" as = "span" color = { Neutral . B40 } >
40- { title }
41- </ Typography >
42- </ TitleContainer >
38+ { title && (
39+ < TitleContainer >
40+ < Typography variant = "subtitle2" as = "span" color = { Neutral . B40 } >
41+ { title }
42+ </ Typography >
43+ </ TitleContainer >
44+ ) }
4345 { options . map ( option => {
4446 const { value, label, disabled, id } = option ;
4547 const isSelected = selectedValues ?. includes ( value ) ;
You can’t perform that action at this time.
0 commit comments