MCPcopy Create free account
hub / github.com/DioxusLabs/dioxus-components / CodeBlock

Function CodeBlock

preview/src/main.rs:413–422  ·  view source on GitHub ↗
(source: HighlightedCode)

Source from the content-addressed store, hash-verified

411
412#[component]
413fn CodeBlock(source: HighlightedCode) -> Element {
414 rsx! {
415 div {
416 class: "dx-code-block",
417 tabindex: "0",
418 PreviewCode { source: source.source }
419 }
420 CopyButton { position: "absolute", top: "0.5em", right: "0.5em" }
421 }
422}
423
424#[component]
425fn PreviewCode(source: HighlightedSource) -> Element {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected