diff --git a/Cargo.lock b/Cargo.lock index b74d7be6..1a811806 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3242,7 +3242,8 @@ name = "radix-leptos-visually-hidden" version = "0.0.2" dependencies = [ "leptos", - "leptos-style", + "leptos-node-ref", + "radix-leptos-primitive", ] [[package]] diff --git a/book/src/primitives/utilities/visually-hidden.md b/book/src/primitives/utilities/visually-hidden.md index f420d132..b6c1b4ac 100644 --- a/book/src/primitives/utilities/visually-hidden.md +++ b/book/src/primitives/utilities/visually-hidden.md @@ -81,7 +81,9 @@ Anything you put inside this component will be hidden from the screen but will b {{#tabs global="framework" }} {{#tab name="Leptos" }} -No props. +| Prop | Type | Default | +| ---------- | ----------------- | ------- | +| `as_child` | `MaybeProp` | `false` | {{#endtab }} {{#tab name="Yew" }} @@ -124,9 +126,9 @@ use radix_yew_icons::GearIcon; use radix_yew_visually_hidden::*; use yew::prelude::*; -#[component] -fn Example() -> impl IntoView { - view! { +#[function_component] +fn Example() -> Html { + html! {