mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 22:09:22 -05:00
This commit is contained in:
parent
09ef9f8630
commit
e9d1630473
2 changed files with 5 additions and 0 deletions
|
@ -77,3 +77,4 @@ view! {
|
||||||
| disabled | `MaybeSignal<bool>` | `false` | Whether the link is disabled. |
|
| disabled | `MaybeSignal<bool>` | `false` | Whether the link is disabled. |
|
||||||
| disabled_focusable | `MaybeSignal<bool>` | `false` | When set, allows the link to be focusable even when it has been disabled. |
|
| disabled_focusable | `MaybeSignal<bool>` | `false` | When set, allows the link to be focusable even when it has been disabled. |
|
||||||
| children | `Children` | | |
|
| children | `Children` | | |
|
||||||
|
| target | `MaybeSignal<String>` | | Specifies where to open the linked document. |
|
||||||
|
|
|
@ -16,6 +16,9 @@ pub fn Link(
|
||||||
#[prop(optional, into)]
|
#[prop(optional, into)]
|
||||||
disabled_focusable: MaybeSignal<bool>,
|
disabled_focusable: MaybeSignal<bool>,
|
||||||
children: Children,
|
children: Children,
|
||||||
|
/// Specifies where to open the linked document.
|
||||||
|
#[prop(optional, into)]
|
||||||
|
target: MaybeSignal<String>,
|
||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
mount_style("link", include_str!("./link.css"));
|
mount_style("link", include_str!("./link.css"));
|
||||||
|
|
||||||
|
@ -46,6 +49,7 @@ pub fn Link(
|
||||||
href=href
|
href=href
|
||||||
tabindex=tabindex
|
tabindex=tabindex
|
||||||
aria-disabled=move || link_disabled.get().then_some("true")
|
aria-disabled=move || link_disabled.get().then_some("true")
|
||||||
|
target=target
|
||||||
>
|
>
|
||||||
{children()}
|
{children()}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue