Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
rand0mC0d3r committed Aug 29, 2023
1 parent 04e2d9e commit e2cba15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function App() {
>
<StatusCoreGenerator />
<MenuPanel />
<KeyboardShortcuts />
{/* <Sidebars /> */}
{/* <Samples />
<Search />
Expand Down
17 changes: 9 additions & 8 deletions src/components/MenuPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ export default function () {
ctrlKey: true, altKey: true },
]

const content = <MenuList>
const content = <MenuList autoFocusItem variant="menu">
{items
.filter((item) => ['divider', 'item'].some(t => item.type === t))
.map((item, index) => item.type === 'divider'
? <Divider key={`${item.type}-${item.label || index}`} />
: <MenuItem key={`${item.type}-${item.label || index}`} onClick={() => triggers(item.label)} >
<ListItemIcon>{item.icon}</ListItemIcon>
<ListItemText style={{ width: '250px' }}>{item.label}</ListItemText>
{item?.id && <KeyboardHelper hasTooltip={true} shortcutId={item.id} />}
</MenuItem>)}
.map((item, index) =>
item.type === 'divider'
? <Divider key={`${item.type}-${item.label || index}`} />
: <MenuItem key={`${item.type}-${item.label || index}`} onClick={() => triggers(item.label)} >
<ListItemIcon>{item.icon}</ListItemIcon>
<ListItemText style={{ width: '250px' }}>{item.label}</ListItemText>
{item?.id && <KeyboardHelper hasTooltip={true} shortcutId={item.id} />}
</MenuItem>)}
</MenuList>

const keyboards = items.filter((item) => ['command', 'item'].some(t => item.type === t))
Expand Down

0 comments on commit e2cba15

Please sign in to comment.