mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 16:19:10 +03:00
* init * fix build issues * move deps over * Update CommandMenuWrapper.tsx * build fixes * Update sitemap_www.xml * reset * Update sitemap_www.xml * Update tsconfig.json * Update package.json * Update package.json * Update package-lock.json * Update package.json
12 lines
480 B
TypeScript
12 lines
480 B
TypeScript
import { useCommandState } from 'cmdk'
|
|
import { CommandItem } from './Command.utils'
|
|
import React from 'react'
|
|
|
|
export default function ChildItem({ children, isSubItem, ...props }: any) {
|
|
const search = useCommandState((state) => state.search)
|
|
// if search is empty & items is marked as a subItem, don't show it
|
|
// ie: only show these items in search results, not top level
|
|
if (!search && isSubItem) return null
|
|
return <CommandItem {...props}>{children}</CommandItem>
|
|
}
|