import { ClassValue } from '@/lib/tailwind'; import { Paragraph } from './Paragraph'; import { Heading } from './Heading'; import { ListOrdered } from './ListOrdered'; import { ListUnordered } from './ListUnordered'; import { ListItem } from './ListItem'; import { CodeBlock } from './CodeBlock'; import { tcls } from '@/lib/tailwind'; import { Hint } from './Hint'; import { DocumentContextProps } from './DocumentView'; import { Images } from './Images'; import { Tabs } from './Tabs'; export interface BlockProps extends DocumentContextProps { block: T; style?: ClassValue; } export function Block(props: BlockProps) { const { block, style, ...contextProps } = props; switch (block.type) { case 'paragraph': return ; case 'heading-1': case 'heading-2': case 'heading-3': return ; case 'list-ordered': return ; case 'list-unordered': return ; case 'list-item': return ; case 'code': return ; case 'hint': return ; case 'images': return ; case 'tabs': return ; default: return
Unsupported block {block.type}
; } }