The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Add admonition component since it's required by some of the integration pages.
Ivan Vasilov4b5c5514a1c0
diff --git a/apps/www/components/Admonition.tsx b/apps/www/components/Admonition.tsxnew file mode 100644index 00000000000..8a85475d929--- /dev/null+++ b/apps/www/components/Admonition.tsx@@ -0,0 +1,50 @@+import { PropsWithChildren } from 'react'+import { IconAlertTriangle, IconHelpCircle, IconInfo } from 'ui'++export interface AdmonitionProps {+ type: 'note' | 'tip' | 'info' | 'caution' | 'danger'+ label?: string+}++const Admonition = ({ type = 'note', label, children }: PropsWithChildren<AdmonitionProps>) => {+ return (+ <div+ className={[+ 'shadow p-4 rounded border-l-[5px] space-y-2 my-4',+ `${+ type === 'note'+ ? 'bg-scale-400 border-scale-800'+ : type === 'info'+ ? 'bg-scale-500 border-scale-800'+ : type === 'tip'+ ? 'bg-brand-300 border-brand-800'+ : type === 'caution'+ ? 'bg-yellow-400 border-yellow-800'+ : type === 'danger'+ ? 'bg-red-500 border-red-800'+ : 'bg-scale-500 border-scale-800'+ }`,+ ].join(' ')}+ >+ <div className="flex items-center space-x-2">+ {type === 'note' ? (+ <IconInfo className="text-scale-1200" size={18} strokeWidth={1.5} />+ ) : type === 'info' ? (+ <IconInfo className="text-scale-1200" size={18} strokeWidth={1.5} />+ ) : type === 'tip' ? (+ <IconHelpCircle className="text-scale-1200" size={18} strokeWidth={1.5} />+ ) : type === 'caution' ? (+ <IconAlertTriangle className="text-scale-1200" size={18} strokeWidth={1.5} />+ ) : type === 'danger' ? (+ <IconAlertTriangle className="text-scale-1200" size={18} strokeWidth={1.5} />+ ) : (+ <IconInfo className="text-scale-1200" size={18} strokeWidth={1.5} />+ )}+ <p className="text-sm text-scale-1200 uppercase my-0 font-bold">{label || type}</p>+ </div>+ <div className="admonition-content text-scale-1200 text-base space-y-1">{children}</div>+ </div>+ )+}++export default Admonitiondiff --git a/apps/www/pages/partners/integrations/[slug].tsx b/apps/www/pages/partners/integrations/[slug].tsxindex e0fe939a056..6e3478267b5 100644--- a/apps/www/pages/partners/integrations/[slug].tsx+++ b/apps/www/pages/partners/integrations/[slug].tsx@@ -9,6 +9,7 @@ import { Dispatch, SetStateAction, useState } from 'react'import { Swiper, SwiperSlide } from 'swiper/react'import 'swiper/swiper.min.css'import { CodeBlock, IconChevronLeft, IconExternalLink } from 'ui'+import Admonition from '~/components/Admonition'import ImageModal from '~/components/ImageModal'import InlineCodeTag from '~/components/InlineCode'import DefaultLayout from '~/components/Layouts/Default'@@ -24,6 +25,7 @@ function mdxComponents(callback: Dispatch<SetStateAction<string | null>>) {const components = {CodeBlock,CH,+ Admonition,pre: (props: any) => {return <CodeBlock {...props.children.props} />},