mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
This PR moves several components which rely on `next` out of the `ui` package to the `ui-patterns` package. `ui-patterns` package is intented to be imported with specific imports so it's ok if there are components reliant on `next` in there. The `SonnerToaster` component has removed its dependency by requiring a prop for `theme`.
32 lines
556 B
TypeScript
32 lines
556 B
TypeScript
import { Mermaid } from 'ui-patterns/Mermaid'
|
|
|
|
export default function MermaidERDiagram() {
|
|
return (
|
|
<Mermaid
|
|
chart={`
|
|
erDiagram
|
|
USERS ||--o{ POSTS : creates
|
|
USERS ||--o{ COMMENTS : writes
|
|
POSTS ||--o{ COMMENTS : has
|
|
USERS {
|
|
uuid id PK
|
|
string email
|
|
timestamp created_at
|
|
}
|
|
POSTS {
|
|
uuid id PK
|
|
uuid user_id FK
|
|
string title
|
|
text content
|
|
}
|
|
COMMENTS {
|
|
uuid id PK
|
|
uuid user_id FK
|
|
uuid post_id FK
|
|
text content
|
|
}
|
|
`}
|
|
/>
|
|
)
|
|
}
|