Macro freya::components::import_svg

source ·
macro_rules! import_svg {
    ($component_name:ident, $path:expr, { $($key:ident : $value:expr),* $(,)? }) => { ... };
}
Expand description

Generate a Dioxus component rendering the specified SVG.

§Example


import_svg!(Ferris, "../../../examples/ferris.svg", {
    width: "auto",
    height: "40%",
});

fn app() -> Element {
    rsx!(
        Ferris {
           width: "150",
        }
    )
}