Macro freya_components::import_svg

source ยท
macro_rules! import_svg {
    ($component_name:ident, $path:expr, $width: expr, $height: expr) => { ... };
}
Expand description

Generate a Dioxus component rendering the specified SVG.

Example:


import_svg!(Ferris, "../../../examples/ferris.svg", "100%", "100%");

fn app() -> Element {
    rsx!(Ferris {})
}

fn another_app() -> Element {
    rsx!(Ferris {
        width: "150",
        height: "40%",
    })
}