import * as React from 'react'; import { Menu, MenuProps } from '@fluentui/react-northstar'; const MenuExamplePositioningShorthand = () => { const [position, setPosition] = React.useState<'above' | 'before'>(undefined); const items: MenuProps['items'] = [ { content: 'Editorials', key: 'editorials', menu: { items: [ { active: true, content: 'item1', key: '1', menu: { items: [ { key: '1', content: 'item2.1' }, { key: '2', content: 'item2.2' }, ], popper: position && { position, }, }, menuOpen: true, }, ], popper: position && { position, }, }, menuOpen: true, }, ]; return (

); }; export default MenuExamplePositioningShorthand;