use leptos::leptos_dom::*; use leptos::*; pub trait DashboardTile { fn image_path(&self) -> String; fn title(&self) -> String; fn link(&self) -> String; fn description(&self) -> Option { None } } impl IntoView for &dyn DashboardTile { fn into_view(self) -> View { let link = self.link(); view! {
dashboard-tile

{self.title()}

{self.description().unwrap_or_default()}

}.into_view() } }