mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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 = () => {
|
||||
|
||||
Reference in New Issue
Block a user