use leptos::prelude::*;
#[component]
pub fn ChartLinearGradient(
#[prop(into)]
id: String,
#[prop(into)]
from: String,
#[prop(into)]
to: String,
) -> impl IntoView {
view! {
<linearGradient id=id x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stop-color=from />
<stop offset="100%" stop-color=to />
</linearGradient>
}
}
#[component]
pub fn ChartDefs(children: Children) -> impl IntoView {
view! {
<defs>{children()}</defs>
}
}