orbital_charts/shared/defs/
mod.rs1use leptos::prelude::*;
4
5#[component]
7pub fn ChartLinearGradient(
8 #[prop(into)]
10 id: String,
11 #[prop(into)]
13 from: String,
14 #[prop(into)]
16 to: String,
17) -> impl IntoView {
18 view! {
19 <linearGradient id=id x1="0%" y1="0%" x2="0%" y2="100%">
20 <stop offset="0%" stop-color=from />
21 <stop offset="100%" stop-color=to />
22 </linearGradient>
23 }
24}
25
26#[component]
28pub fn ChartDefs(children: Children) -> impl IntoView {
29 view! {
30 <defs>{children()}</defs>
31 }
32}