Skip to content

Commit

Permalink
fixed example
Browse files Browse the repository at this point in the history
  • Loading branch information
maccesch committed Oct 20, 2023
1 parent 659f371 commit a80987f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions examples/custom_renderers_svg/src/renderers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,16 @@ where
}

#[component]
pub fn SvgTextCellRenderer<T>(
#[allow(unused_variables)]
pub fn SvgTextCellRenderer<T, F>(
#[prop(into)] class: MaybeSignal<String>,
#[prop(into)] value: MaybeSignal<T>,
on_change: F,
index: usize,
) -> impl IntoView
where
T: IntoView + Clone + 'static,
F: Fn(String) + 'static,
{
let x = x_from_index(index);

Expand All @@ -112,11 +115,16 @@ where
}

#[component]
pub fn SvgPathCellRenderer(
#[allow(unused_variables)]
pub fn SvgPathCellRenderer<F>(
#[prop(into)] class: MaybeSignal<String>,
#[prop(into)] value: MaybeSignal<String>,
on_change: F,
index: usize,
) -> impl IntoView {
) -> impl IntoView
where
F: Fn(String) + 'static,
{
let transform = transform_from_index(index, 3);

view! {
Expand Down

0 comments on commit a80987f

Please sign in to comment.