Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,19 @@ web-sys = { version = "0.3", default-features = false, features = [
"DomTokenList",
"DragEvent",
"Element",
"Event",
"EventTarget",
"Headers",
"HtmlElement",
"HtmlInputElement",
"InputEvent",
"KeyboardEvent",
"Location",
"MediaQueryList",
"MouseEvent",
"MutationObserver",
"MutationObserverInit",
"MutationRecord",
"Navigator",
"Node",
"NodeList",
Expand Down
5 changes: 5 additions & 0 deletions app/src/domain/markdown_ui/components/static_demo_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fn transform_code_for_display(code: &str) -> String {
#[component]
pub fn StaticDemoWrapper(demo_type: MarkdownType, children: Children) -> impl IntoView {
let current_tab = RwSignal::new(Tab::default());
let use_embedded_blocks = matches!(demo_type, MarkdownType::StaticDemoInputOtp);

// Zero-allocation static lookup
let Some(demo_data) = get_static_registry_entry(demo_type) else {
Expand Down Expand Up @@ -60,6 +61,10 @@ pub fn StaticDemoWrapper(demo_type: MarkdownType, children: Children) -> impl In
// Store children at the top level so we can reference it reactively
let children_view = children();

if use_embedded_blocks {
return view! { <div class="w-full">{children_view}</div> }.into_any();
}

view! {
<div class="flex flex-col gap-2 w-full">
<div class="flex justify-between items-center">
Expand Down
Loading