Skip to content

Commit

Permalink
fix @keystone-6/example-custom-admin-ui-navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 21, 2024
1 parent 8e5abf7 commit a32f5cd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
import React from 'react'

import { ListNavItems, NavigationContainer, NavItem } from '@keystone-6/core/admin-ui/components'

import { Divider } from '@keystar/ui/layout'
import {
getHrefFromList,
DeveloperResourcesMenu,
NavContainer,
NavFooter,
NavList,
NavItem,
} from '@keystone-6/core/admin-ui/components'
import type { NavigationProps } from '@keystone-6/core/admin-ui/components'

export function CustomNavigation ({ lists }: NavigationProps) {
return (
<NavigationContainer>
<NavItem href='/'>Dashboard</NavItem>
<ListNavItems lists={lists} />
<NavItem href='https://keystonejs.com'>Keystone Docs</NavItem>
</NavigationContainer>
<NavContainer>
<NavList>
<NavItem href='/'>Dashboard</NavItem>
<NavItem href='https://keystonejs.com'>Keystone Docs</NavItem>
<Divider />
{lists.map((list) => (
<NavItem key={list.key} href={getHrefFromList(list)}>
{list.label}
</NavItem>
))}
</NavList>

<NavFooter>
<DeveloperResourcesMenu />
</NavFooter>
</NavContainer>
)
}
1 change: 1 addition & 0 deletions examples/custom-admin-ui-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"postinstall": "keystone postinstall"
},
"dependencies": {
"@keystar/ui": "^0.7.6",
"@keystone-6/core": "^6.2.0",
"@prisma/client": "5.17.0",
"react": "^18.3.1"
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a32f5cd

Please sign in to comment.