mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 18:00:20 -04:00
7af346d185
* realtime examples * more examples * styling updates * use broadcast from database for todos * updated realtime examples * update layout * clean up * turbo * update example structure * remove context * remove text from example * realtime migration * Smol fix * Update * Update * Final fix --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
24 lines
576 B
TypeScript
24 lines
576 B
TypeScript
'use client'
|
|
|
|
import React from 'react'
|
|
|
|
type CodeDisplayProps = {
|
|
code: string
|
|
title?: string
|
|
}
|
|
|
|
export default function CodeDisplay({ code, title = 'Code' }: CodeDisplayProps) {
|
|
return (
|
|
<div className="h-full flex flex-col">
|
|
<div className="bg-neutral-900 border-b border-neutral-700/50 text-neutral-400 text-xs py-2 px-4">
|
|
{title}
|
|
</div>
|
|
<div className="bg-neutral-900 p-4 overflow-auto flex-1">
|
|
<pre className="text-xs text-neutral-300 overflow-auto">
|
|
<code>{code}</code>
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|