maciejhirsz / kobold

Easy declarative web interfaces.
https://docs.rs/kobold/
Mozilla Public License 2.0
385 stars 7 forks source link

Add Support for HTML Tags with Namespace and use it to Support SVG Tags #90

Closed Cryptjar closed 3 months ago

Cryptjar commented 7 months ago

This PR adds allows to define HTLM tags with a namespace in the macro sub-crate, which allows defining SVG tags and thus allowing users to create SVGs via the view! macro.

E.g.:

fn main() {
    kobold::start(kobold::view! {
        <svg width="100" height="100">
            <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
        </svg>
    });
}
maciejhirsz commented 3 months ago

Thanks, sorry for taking forever! This should land along with <!snake_case> components in the next release soon :tm:.