The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
replace badges
Jonathan Summers-Muirb63bbcde95a0
diff --git a/packages/ui/src/components/Command/Command.Badges.tsx b/packages/ui/src/components/Command/Command.Badges.tsxnew file mode 100644index 00000000000..b78a1121a9d--- /dev/null+++ b/packages/ui/src/components/Command/Command.Badges.tsx@@ -0,0 +1,10 @@+import { Badge } from 'ui'+import { Microscope } from 'lucide-react'++export const BadgeExperimental = () => {+ return (+ <Badge color="scale">+ <Microscope className="!mr-1.5 !w-3.5 !h-3.5" /> Experimental+ </Badge>+ )+}diff --git a/packages/ui/src/components/Command/Command.utils.tsx b/packages/ui/src/components/Command/Command.utils.tsxindex c9b2c14b23e..abb1cea0c9b 100644--- a/packages/ui/src/components/Command/Command.utils.tsx+++ b/packages/ui/src/components/Command/Command.utils.tsx@@ -180,7 +180,7 @@ type CommandPrimitiveItemProps = React.ComponentPropsWithoutRef<typeof CommandPrexport interface CommandItemProps extends CommandPrimitiveItemProps {type: 'link' | 'block-link' | 'command'- badge?: string+ badge?: React.ReactNode}export const CommandItem = React.forwardRef<CommandPrimitiveItemElement, CommandItemProps>(@@ -242,11 +242,7 @@ export const CommandItem = React.forwardRef<CommandPrimitiveItemElement, Command><div className="w-full flex flex-row justify-between items-center"><div className="flex flex-row items-center">{children}</div>- {badge && (- <span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-opacity-10 bg-brand-200 text-brand-1100 border border-brand-700">- {badge}- </span>- )}+ {badge}</div></CommandPrimitive.Item>)diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsxindex 5a133b40668..e22e6fab199 100644--- a/packages/ui/src/components/Command/CommandMenu.tsx+++ b/packages/ui/src/components/Command/CommandMenu.tsx@@ -33,6 +33,7 @@ import ThemeOptions from './ThemeOptions'import APIKeys from './APIKeys'import SearchableStudioItems from './SearchableStudioItems'import CommandMenuShortcuts from './CommandMenuShortcuts'+import { BadgeExperimental } from './Command.Badges'export const CHAT_ROUTES = [COMMAND_ROUTES.AI, // this one is temporary@@ -91,7 +92,7 @@ const CommandMenu = ({ projectRef }: CommandMenuProps) => {<CommandGroup heading="Documentation" forceMount><CommandItemtype="command"- badge="Experimental"+ badge={<BadgeExperimental />}onSelect={() => {setPages([...pages, COMMAND_ROUTES.AI])}}@@ -175,7 +176,7 @@ const CommandMenu = ({ projectRef }: CommandMenuProps) => {<CommandItemforceMounttype="command"- badge="Experimental"+ badge={<BadgeExperimental />}onSelect={() => setPages([...pages, COMMAND_ROUTES.GENERATE_SQL])}><AiIcon className="text-scale-1100" />diff --git a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx b/packages/ui/src/components/Command/CommandMenuShortcuts.tsxindex 873c70b93d4..34096855c07 100644--- a/packages/ui/src/components/Command/CommandMenuShortcuts.tsx+++ b/packages/ui/src/components/Command/CommandMenuShortcuts.tsx@@ -1,6 +1,6 @@import { IconArrowLeft } from '../Icon/icons/IconArrowLeft'-import { Badge } from 'ui'+import { BadgeExperimental } from './Command.Badges'import { COMMAND_ROUTES } from './Command.constants'import { CommandShortcut } from './Command.utils'import { useCommandMenu } from './CommandMenuProvider'@@ -32,11 +32,7 @@ export default function CommandMenuShortcuts() {</CommandShortcut>))}- {currentPage && isExperimental(currentPage) && (- <Badge dot color="scale">- Experimental- </Badge>- )}+ {currentPage && isExperimental(currentPage) && <BadgeExperimental />}</div></div>)