Skip to content

Commit

Permalink
Use nightly cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-hansen committed Dec 9, 2024
1 parent 5fc9021 commit 83800fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions leptos/src/attribute_interceptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use leptos::prelude::*;
type ChildBuilder<T> = dyn Fn(AnyAttribute) -> T + Send + Sync + 'static;

/// Intercepts attributes passed to your component, allowing passing them to any element.
///
///
/// By default, Leptos passes any attributes passed to your component (e.g. `<MyComponent
/// attr:class="some-class"/>`) to the top-level element in the view returned by your component.
/// [`AttributeInterceptor`] allows you to intercept this behavior and pass it onto any element in
Expand All @@ -26,7 +26,7 @@ type ChildBuilder<T> = dyn Fn(AnyAttribute) -> T + Send + Sync + 'static;
///
/// #[component]
/// pub fn MyComponent() -> impl IntoView {
/// view!{
/// view! {
/// <AttributeInterceptor let:attrs>
/// <div id="wrapper">
/// <div id="inner" {..attrs} />
Expand All @@ -39,7 +39,7 @@ type ChildBuilder<T> = dyn Fn(AnyAttribute) -> T + Send + Sync + 'static;
pub fn AttributeInterceptor<Chil, T>(
/// The elements that will be rendered, with the attributes this component received as a
/// parameter.
children: Chil
children: Chil,
) -> impl IntoView
where
Chil: Fn(AnyAttribute) -> T + Send + Sync + 'static,
Expand Down

0 comments on commit 83800fb

Please sign in to comment.