Menu: refactor MenuItem and MenuGroup to be standalone component (#31639)

* Menu: refactor MenuItem and MenuGroup to be standalone component

* fixes small nits

* Chore: Refactored other components to correspond with the new Menu system (#31676)

* fixes affected components using Menu

* fixes affected components using Menu components

* fixes frontend test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* fixes frontend docs test- I hope

* added support for accessibility

* fixes frontend test- I hope

* Improve storybook story and simplify ButtonSelect

* Fixed broken graph context menu

* fixes frontend test- I hope

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Uchechukwu Obasi
2021-03-11 15:35:17 +01:00
committed by GitHub
parent 77a024abb3
commit f51653647d
19 changed files with 328 additions and 253 deletions

View File

@@ -16,10 +16,18 @@ export default {
},
};
const menuItems = [{ label: 'Test', items: [{ label: 'First' }, { label: 'Second' }] }];
const menuItems = [
{
label: 'Test',
items: [
{ label: 'First', ariaLabel: 'First' },
{ label: 'Second', ariaLabel: 'Second' },
],
},
];
export const Basic = () => {
return <ContextMenu x={10} y={11} onClose={() => {}} items={menuItems} />;
return <ContextMenu x={10} y={11} onClose={() => {}} itemsGroup={menuItems} />;
};
export const WithState = () => {