1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use leptos::prelude::*; #[derive(Clone)] pub struct GridInjection { pub x_gap: Signal<u16>, } impl GridInjection { pub fn new(x_gap: Signal<u16>) -> Self { Self { x_gap } } } pub fn use_grid() -> GridInjection { expect_context() }