use topcoat::{ Result, context::Cx, view::{View, component, view}, }; use crate::content::Block; #[component] pub async fn blocks(cx: &Cx, items: &[Block]) -> Result { Ok(view! {
for block in items { match block { Block::Heading(text) =>

(text)

, Block::Paragraph(text) =>

(text)

, Block::Lines(lines) =>

for (i, line) in lines.iter().enumerate() { if i > 0 {
} (line) }

, } }
}) }