forked from mirrors/rmenu
feat: include default alt-icon when icon is missing
This commit is contained in:
parent
3f7baff1fb
commit
19901cbe34
1 changed files with 2 additions and 4 deletions
|
@ -63,10 +63,8 @@ fn render_image<'a, T>(
|
||||||
return cx.render(rsx! { img { class: "image", src: "{img}" } });
|
return cx.render(rsx! { img { class: "image", src: "{img}" } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(alt) = alt {
|
let alt = alt.map(|s| s.as_str()).unwrap_or_else(|| "?");
|
||||||
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// render a single result entry w/ the given information
|
/// render a single result entry w/ the given information
|
||||||
|
|
Loading…
Add table
Reference in a new issue