2023-04-16 21:46:10 -05:00
|
|
|
// Might wanna move stuff form `void_poem.rs` into here...
|
|
|
|
use crate::utils::prop_structs::{ContentProps};
|
2023-04-17 18:04:18 -05:00
|
|
|
use super::super::utils::user_prefs::ThemedComponent;
|
2023-04-16 21:46:10 -05:00
|
|
|
use dioxus::prelude::*;
|
|
|
|
|
|
|
|
pub fn RenderContent(cx: Scope<ContentProps>) -> Element {
|
2023-04-17 18:04:18 -05:00
|
|
|
let (user_theme, user_font) = cx.props.user_prefs.get_pref_classes(ThemedComponent::Card);
|
2023-04-16 21:46:10 -05:00
|
|
|
let content = &cx.props.content;
|
|
|
|
#[cfg(any(target_family = "windows", target_family = "unix"))]
|
|
|
|
return cx.render(rsx!{
|
2023-04-17 18:04:18 -05:00
|
|
|
div { class: "flex p-4 md:pl-8 md:pr-8 ml-2 mr-2 text-lg text-center ring-4 {user_theme} {user_font}",
|
2023-04-16 21:46:10 -05:00
|
|
|
"{content}",
|
|
|
|
}
|
|
|
|
});
|
|
|
|
#[cfg(target_family = "wasm")]
|
|
|
|
return cx.render(rsx!{
|
|
|
|
div { class: "flex p-4 ml-2 mr-2 ring-4",
|
|
|
|
dangerous_inner_html: "{content}",
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|