mirror of
https://github.com/supabase/supabase.git
synced 2026-05-23 19:13:13 +08:00
* initial commit * fix: remove methods which aren't in python lib yet * temporarily remove postgrest * feat: add non-admin methods * fix: temporarily remove non-admin methods * Update Dashboard Auth Settings links * Update example names * Add example * started adding pages * fix: update python ids * fix: change python docs image back to grayscale * fix: update ids of storage functions * Update apps/docs/pages/reference/python/[...slug].tsx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: reinstate python image * filter common navmenu sections based on library * fix reference icons * Add introduction * Add IDs * Update common client libs sections * Update intro * fix: add reference section and database section Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: dannykng <danny@supabase.io> Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francisco Mazzoni <francisco@supabase.io>
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
// import apiCommonSections from '~/../../spec/common-client-libs-sections.json'
|
|
|
|
import { RefIdOptions, RefKeyOptions } from './NavigationMenu'
|
|
import NavigationMenuRefListItems from './NavigationMenuRefListItems'
|
|
|
|
import React from 'react'
|
|
|
|
interface INavigationMenuRefList {
|
|
id: RefIdOptions
|
|
lib: RefKeyOptions
|
|
commonSections: any[] // to do type up
|
|
|
|
// the keys of menu items that are allowed to be shown on the side menu
|
|
// if undefined, we show all the menu items
|
|
allowedClientKeys?: string[]
|
|
active: boolean
|
|
spec?: any
|
|
}
|
|
|
|
const NavigationMenuRefList: React.FC<INavigationMenuRefList> = ({
|
|
id,
|
|
lib,
|
|
commonSections,
|
|
|
|
active,
|
|
spec,
|
|
}) => {
|
|
const filteredSections = commonSections.filter((section) => {
|
|
return !section.excludes?.includes(id)
|
|
})
|
|
|
|
return (
|
|
<div
|
|
className={[
|
|
'transition-all ml-8 duration-150 ease-out',
|
|
// enabled
|
|
active && 'opacity-100 ml-0 delay-150 h-auto',
|
|
// move menu back to margin-left
|
|
// level === 'home' && 'ml-12',
|
|
// disabled
|
|
// level !== 'home' && level !== id ? '-ml-8' : '',
|
|
!active ? 'opacity-0 invisible absolute h-0 overflow-hidden' : '',
|
|
].join(' ')}
|
|
>
|
|
<NavigationMenuRefListItems id={id} lib={lib} commonSections={filteredSections} spec={spec} />
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default React.memo(NavigationMenuRefList)
|