Files
supabase/apps/docs/features/ui/GlassPanelWithIconPicker.tsx
Francesco Sansalvadore 0d657df42e feat: docs global top nav (#26917)
Docs global top nav
2024-07-04 11:51:13 +02:00

19 lines
608 B
TypeScript

import { type ComponentProps, type PropsWithChildren } from 'react'
import { GlassPanel } from 'ui-patterns/GlassPanel'
import MenuIconPicker from '~/components/Navigation/NavigationMenu/MenuIconPicker'
type GlassPanelWithIconPickerProps = PropsWithChildren<
Omit<ComponentProps<typeof GlassPanel>, 'icon'> & { icon: string }
>
function GlassPanelWithIconPicker({ children, icon, ...props }: GlassPanelWithIconPickerProps) {
return (
<GlassPanel icon={<MenuIconPicker icon={icon} width={18} height={18} />} {...props}>
{children}
</GlassPanel>
)
}
export { GlassPanelWithIconPicker }