// Badge component for labels and tags

use leptos::prelude::*;

/// Badge component for displaying labels
#[component]
pub fn Badge(#[prop(default = "")] class: &'static str, children: Children) -> impl IntoView {
    let combined_class = format!(
        "inline-block px-3 py-1 rounded-full bg-cyan-500/20 text-cyan-400 text-xs font-medium {}",
        class
    );

    view! {
        <span class=combined_class>
            {children()}
        </span>
    }
}
