Skip to main content

CodeBlock

Function CodeBlock 

Source
pub fn CodeBlock(_: CodeBlockProps) -> Element
Expand description

A read-only block of source code.

§Props

For details, see the props struct definition.

  • source : CodeSource
  • lang : Option<String>

    The language, as data-fc-lang, e.g. “rust”.

  • layout : CodeLayout
  • unsupported : bool

    No highlighter knows this language: show its name in a bar above the text.

  • class : Option<String>
  • attributes : Vec<Attribute>