#icons #svg-icons #dioxus #component #heroicons #shape #solid

dioxus-heroicons

Dioxus 组件用于英雄图标(https://heroicons.com/)

6 个版本

0.2.0 2023年1月21日
0.1.4 2022年4月21日
0.1.3 2022年3月12日
0.1.1 2022年2月4日
0.1.0 2022年1月31日

#608 in 图像

Apache-2.0 OR MIT

1MB
6.5K SLoC

heroicons 用于 Dioxus 作为组件

此库提供了两个组件,IconIconButton,它们将生成英雄图标的 SVG。

use dioxus::prelude::*;
use dioxus_heroicons::{Icon, IconButton, solid::Shape};

#[inline_props]
fn DeleteButton(cx: Scope, foo: u8) -> Element {
    let onclick = move |evt| {
        // Delete a thing
    };
    let disabled = if foo < 42 { true } else { false} };
    cx.render(rsx! {
        IconButton {
            onclick: onclick,
            class: "some-css-class",
            title: "Delete it",
            disabled: disabled,
            size: 30,
            icon: Shape::Trash,
        }
    })
}

fn PointsRight(cx: Scope) -> Element {
    cx.render(rsx! {
        Icon {
            icon: Shape::ArrowRight,
            fill: "blue",
        }
    })
}

请参阅 库文档 了解更多详情。

许可证

许可方式任选其一

由你选择。

贡献

除非你明确声明,否则任何有意提交以包含在作品中的贡献,如 Apache-2.0 许可证中定义的,都应按上述方式双许可,不附加任何额外的条款或条件。

依赖项

~4.5–6.5MB
~117K SLoC