Files
supabase/apps/docs/components/Mermaid.tsx
Matt Linkous 71e94a1590 Add partner integration guide and mermaid diagrams (#45730)
- **Draft**
- **Update**
- **feat: add beautiful-mermaid and integration flow diagrams**
- **Make mermaid theme match site**


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added Mermaid diagram rendering in docs with themed SVG output.

* **Documentation**
* Added "Supabase Partner Integration Guide" covering simple and
signed-redirect flows, JWT verification, sequence diagrams, and key
guidance.
* Updated site navigation to include the new partner integration guide.

* **Chores**
  * Added Mermaid rendering dependency.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45730)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Chris Chinchilla <chris@chrischinchilla.com>
Co-authored-by: Chris Chinchilla <chris.ward@supabase.io>
2026-05-13 08:47:33 -05:00

26 lines
724 B
TypeScript

import { renderMermaidSVG } from 'beautiful-mermaid'
interface MermaidProps {
chart: string
}
export function Mermaid({ chart }: MermaidProps) {
const svg = renderMermaidSVG(chart, {
bg: 'hsl(var(--background-default))',
fg: 'hsl(var(--foreground-default))',
accent: 'hsl(var(--brand-default))',
muted: 'hsl(var(--foreground-light))',
line: 'hsl(var(--border-strong))',
border: 'hsl(var(--border-strong))',
surface: 'hsl(var(--background-surface-200))',
transparent: true,
})
return (
<div
className="my-6 overflow-x-auto rounded-md border bg-surface-100 p-4 [&>svg]:mx-auto [&>svg]:h-auto [&>svg]:max-w-full"
dangerouslySetInnerHTML={{ __html: svg }}
/>
)
}