Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Experiment UI component

Joshen Lim94a7a492aee6
diff --git a/apps/temp-docs/components/index.tsx b/apps/temp-docs/components/index.tsx
index 06868c0007e..ff3ce7fda8b 100644
--- a/apps/temp-docs/components/index.tsx
+++ b/apps/temp-docs/components/index.tsx
@@ -7,7 +7,7 @@ import CodeBlock from './CodeBlock/CodeBlock'
const components = {
Alert,
Tabs,
- // TabItem,
+ TabPanel: (props: any) => <Tabs.Panel {...props}>{props.children}</Tabs.Panel>,
code: (props: any) => <CodeBlock {...props} />,
}
diff --git a/apps/temp-docs/components/nav/NavBar.tsx b/apps/temp-docs/components/nav/NavBar.tsx
index 35f16858802..e7fe8bbd1c0 100644
--- a/apps/temp-docs/components/nav/NavBar.tsx
+++ b/apps/temp-docs/components/nav/NavBar.tsx
@@ -5,21 +5,20 @@ import Link from 'next/link'
import { useTheme } from '../Providers'
const NavBar = ({ currentPage }: { currentPage: string }) => {
- const [mounted, setMounted] = useState(false)
const { isDarkMode } = useTheme()
+ const [mounted, setMounted] = useState(false)
useEffect(() => {
setMounted(true)
}, [isDarkMode])
const pageLinks = [
- { text: 'Guides', active: currentPage == 'Guides', link: '/guides' },
+ { text: 'Guides', link: '/guides' },
{
text: 'Reference',
- active: currentPage == 'Reference',
link: '/reference/javascript/supabase-client',
},
- { text: 'Discussions', active: currentPage == 'Discussions', link: '/discussions' },
+ { text: 'Discussions', link: '/discussions' },
]
return (
@@ -46,7 +45,11 @@ const NavBar = ({ currentPage }: { currentPage: string }) => {
{pageLinks.map((p) => (
<li key={`${p.text}-${p.link}`}>
<Link href={p.link}>
- <a className={`text-sm ${p.active ? 'text-brand-900' : 'text-scale-1100'}`}>
+ <a
+ className={`text-sm ${
+ currentPage === p.text ? 'text-brand-900' : 'text-scale-1100'
+ }`}
+ >
{p.text}
</a>
</Link>
diff --git a/apps/temp-docs/docs/guides/local-development.mdx b/apps/temp-docs/docs/guides/local-development.mdx
index 41a205f373f..ccded0a92b6 100644
--- a/apps/temp-docs/docs/guides/local-development.mdx
+++ b/apps/temp-docs/docs/guides/local-development.mdx
@@ -6,11 +6,22 @@ description: How to use Supabase on your local development machine.
## Local Development
-import Tabs from '@theme/Tabs'
-import TabItem from '@theme/TabItem'
+// import Tabs from '@theme/Tabs'
+// import TabItem from '@theme/TabItem'
Learn how to use the Supabase CLI to develop your project locally and deploy to the Supabase Platform.
+{/* This is just my experimentation to use the Tabs component from the UI library but looks odd */}
+
+<Tabs scrollable size="small" type="underlined" listClassNames="px-8 pt-4" defaultActiveId="kong">
+ <TabPanel id="postgres" label="Postgres">
+ Hello
+ </TabPanel>
+ <TabPanel id="kong" label="API Gateway">
+ World
+ </TabPanel>
+</Tabs>
+
## Prerequisites
Make sure you have these installed on your local machine: