import { DocumentBlock } from '@gitbook/api'; import { tcls, ClassValue } from '@/lib/tailwind'; import { Block } from './Block'; import { DocumentContextProps } from './DocumentView'; export function Blocks( props: DocumentContextProps & { /** Blocks to render */ nodes: T[]; /** Ancestors of the blocks */ ancestorBlocks: DocumentBlock[]; /** HTML tag to use */ tag?: Tag; /** Style passed to the wrapper */ style?: ClassValue; /** Style passed to all blocks */ blockStyle?: ClassValue; }, ) { const { nodes, tag: Tag = 'div', style, blockStyle, ...contextProps } = props; return ( {nodes.map((node, index) => ( ))} ); }