Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions book-examples/dioxus/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,21 +628,21 @@ pub fn IconsA1() -> Element {
),
(
rsx! {
AtSign {}
Astroid {}
},
"At Sign",
"Astroid",
),
(
rsx! {
Atom {}
AtSign {}
},
"Atom",
"At Sign",
),
(
rsx! {
AudioLines {}
Atom {}
},
"Audio Lines",
"Atom",
),
];
rsx! {
Expand All @@ -659,6 +659,12 @@ pub fn IconsA1() -> Element {
#[component]
pub fn IconsA2() -> Element {
let icons = [
(
rsx! {
AudioLines {}
},
"Audio Lines",
),
(
rsx! {
AudioWaveform {}
Expand Down Expand Up @@ -4181,6 +4187,12 @@ pub fn IconsF1() -> Element {
},
"Folder Archive",
),
(
rsx! {
FolderBookmark {}
},
"Folder Bookmark",
),
(
rsx! {
FolderCheck {}
Expand Down Expand Up @@ -4235,12 +4247,6 @@ pub fn IconsF1() -> Element {
},
"Folder Git 2",
),
(
rsx! {
FolderHeart {}
},
"Folder Heart",
),
];
rsx! {
for (icon, name) in icons {
Expand All @@ -4256,6 +4262,12 @@ pub fn IconsF1() -> Element {
#[component]
pub fn IconsF2() -> Element {
let icons = [
(
rsx! {
FolderHeart {}
},
"Folder Heart",
),
(
rsx! {
FolderInput {}
Expand Down
6 changes: 4 additions & 2 deletions book-examples/leptos/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ pub fn IconsA1() -> impl IntoView {
(view! { <ArrowUpZA /> }.into_any(), "Arrow Up Za"),
(view! { <ArrowsUpFromLine /> }.into_any(), "Arrows Up From Line"),
(view! { <Asterisk /> }.into_any(), "Asterisk"),
(view! { <Astroid /> }.into_any(), "Astroid"),
(view! { <AtSign /> }.into_any(), "At Sign"),
(view! { <Atom /> }.into_any(), "Atom"),
(view! { <AudioLines /> }.into_any(), "Audio Lines"),
]
key=|icon| icon.1
children=move |(icon, name)| {
Expand All @@ -205,6 +205,7 @@ pub fn IconsA2() -> impl IntoView {
view! {
<For
each=move || [
(view! { <AudioLines /> }.into_any(), "Audio Lines"),
(view! { <AudioWaveform /> }.into_any(), "Audio Waveform"),
(view! { <Award /> }.into_any(), "Award"),
(view! { <Axe /> }.into_any(), "Axe"),
Expand Down Expand Up @@ -920,6 +921,7 @@ pub fn IconsF1() -> impl IntoView {
(view! { <FoldVertical /> }.into_any(), "Fold Vertical"),
(view! { <Folder /> }.into_any(), "Folder"),
(view! { <FolderArchive /> }.into_any(), "Folder Archive"),
(view! { <FolderBookmark /> }.into_any(), "Folder Bookmark"),
(view! { <FolderCheck /> }.into_any(), "Folder Check"),
(view! { <FolderClock /> }.into_any(), "Folder Clock"),
(view! { <FolderClosed /> }.into_any(), "Folder Closed"),
Expand All @@ -929,7 +931,6 @@ pub fn IconsF1() -> impl IntoView {
(view! { <FolderDown /> }.into_any(), "Folder Down"),
(view! { <FolderGit /> }.into_any(), "Folder Git"),
(view! { <FolderGit2 /> }.into_any(), "Folder Git 2"),
(view! { <FolderHeart /> }.into_any(), "Folder Heart"),
]
key=|icon| icon.1
children=move |(icon, name)| {
Expand All @@ -947,6 +948,7 @@ pub fn IconsF2() -> impl IntoView {
view! {
<For
each=move || [
(view! { <FolderHeart /> }.into_any(), "Folder Heart"),
(view! { <FolderInput /> }.into_any(), "Folder Input"),
(view! { <FolderKanban /> }.into_any(), "Folder Kanban"),
(view! { <FolderKey /> }.into_any(), "Folder Key"),
Expand Down
2 changes: 2 additions & 0 deletions book-examples/yew/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ pub fn IconsA() -> Html {
(html! { <ArrowUpZA /> }, "Arrow Up Za"),
(html! { <ArrowsUpFromLine /> }, "Arrows Up From Line"),
(html! { <Asterisk /> }, "Asterisk"),
(html! { <Astroid /> }, "Astroid"),
(html! { <AtSign /> }, "At Sign"),
(html! { <Atom /> }, "Atom"),
(html! { <AudioLines /> }, "Audio Lines"),
Expand Down Expand Up @@ -869,6 +870,7 @@ pub fn IconsF() -> Html {
(html! { <FoldVertical /> }, "Fold Vertical"),
(html! { <Folder /> }, "Folder"),
(html! { <FolderArchive /> }, "Folder Archive"),
(html! { <FolderBookmark /> }, "Folder Bookmark"),
(html! { <FolderCheck /> }, "Folder Check"),
(html! { <FolderClock /> }, "Folder Clock"),
(html! { <FolderClosed /> }, "Folder Closed"),
Expand Down
40 changes: 40 additions & 0 deletions packages/dioxus/src/astroid.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct AstroidProps {
#[props(default = 24)]
pub size: usize,
#[props(default = "currentColor".to_owned())]
pub color: String,
#[props(default = "none".to_owned())]
pub fill: String,
#[props(default = 2)]
pub stroke_width: usize,
#[props(default = false)]
pub absolute_stroke_width: bool,
pub class: Option<String>,
pub style: Option<String>,
}
#[component]
pub fn Astroid(props: AstroidProps) -> Element {
let stroke_width = if props.absolute_stroke_width {
props.stroke_width * 24 / props.size
} else {
props.stroke_width
};
rsx! {
svg {
"xmlns": "http://www.w3.org/2000/svg",
"class": if let Some(class) = props.class { "{class}" },
"style": if let Some(style) = props.style { "{style}" },
"width": "{props.size}",
"height": "{props.size}",
"viewBox": "0 0 24 24",
"fill": "{props.fill}",
"stroke": "{props.color}",
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203" }
}
}
}
41 changes: 41 additions & 0 deletions packages/dioxus/src/folder_bookmark.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct FolderBookmarkProps {
#[props(default = 24)]
pub size: usize,
#[props(default = "currentColor".to_owned())]
pub color: String,
#[props(default = "none".to_owned())]
pub fill: String,
#[props(default = 2)]
pub stroke_width: usize,
#[props(default = false)]
pub absolute_stroke_width: bool,
pub class: Option<String>,
pub style: Option<String>,
}
#[component]
pub fn FolderBookmark(props: FolderBookmarkProps) -> Element {
let stroke_width = if props.absolute_stroke_width {
props.stroke_width * 24 / props.size
} else {
props.stroke_width
};
rsx! {
svg {
"xmlns": "http://www.w3.org/2000/svg",
"class": if let Some(class) = props.class { "{class}" },
"style": if let Some(style) = props.style { "{style}" },
"width": "{props.size}",
"height": "{props.size}",
"viewBox": "0 0 24 24",
"fill": "{props.fill}",
"stroke": "{props.color}",
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M12 6v8l3-3 3 3V6" }
path { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z" }
}
}
}
8 changes: 8 additions & 0 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ mod arrow_up_z_a;
mod arrows_up_from_line;
#[cfg(any(feature = "text", feature = "math", feature = "development"))]
mod asterisk;
#[cfg(any(feature = "shapes", feature = "math"))]
mod astroid;
#[cfg(any(feature = "text", feature = "account"))]
mod at_sign;
#[cfg(feature = "science")]
Expand Down Expand Up @@ -1547,6 +1549,8 @@ mod folder;
#[cfg(feature = "files")]
mod folder_archive;
#[cfg(feature = "files")]
mod folder_bookmark;
#[cfg(feature = "files")]
mod folder_check;
#[cfg(any(feature = "files", feature = "time"))]
mod folder_clock;
Expand Down Expand Up @@ -4519,6 +4523,8 @@ pub use arrow_up_z_a::*;
pub use arrows_up_from_line::*;
#[cfg(any(feature = "text", feature = "math", feature = "development"))]
pub use asterisk::*;
#[cfg(any(feature = "shapes", feature = "math"))]
pub use astroid::*;
#[cfg(any(feature = "text", feature = "account"))]
pub use at_sign::*;
#[cfg(feature = "science")]
Expand Down Expand Up @@ -5842,6 +5848,8 @@ pub use folder::*;
#[cfg(feature = "files")]
pub use folder_archive::*;
#[cfg(feature = "files")]
pub use folder_bookmark::*;
#[cfg(feature = "files")]
pub use folder_check::*;
#[cfg(any(feature = "files", feature = "time"))]
pub use folder_clock::*;
Expand Down
4 changes: 3 additions & 1 deletion packages/icon-name/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! See [the Rust Lucide book](https://lucide.rustforweb.org/) for more documenation.

/// [Lucide](https://lucide.dev/) icon names.
pub static ICON_NAMES: [&str; 1699usize] = [
pub static ICON_NAMES: [&str; 1701usize] = [
"a-arrow-down",
"a-arrow-up",
"a-large-small",
Expand Down Expand Up @@ -103,6 +103,7 @@ pub static ICON_NAMES: [&str; 1699usize] = [
"arrow-up-z-a",
"arrows-up-from-line",
"asterisk",
"astroid",
"at-sign",
"atom",
"audio-lines",
Expand Down Expand Up @@ -673,6 +674,7 @@ pub static ICON_NAMES: [&str; 1699usize] = [
"fold-vertical",
"folder",
"folder-archive",
"folder-bookmark",
"folder-check",
"folder-clock",
"folder-closed",
Expand Down
35 changes: 35 additions & 0 deletions packages/leptos/src/astroid.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn Astroid(
#[prop(default = 24.into(), into)] size: Signal<usize>,
#[prop(default = "currentColor".into(), into)] color: Signal<String>,
#[prop(default = "none".into(), into)] fill: Signal<String>,
#[prop(default = 2.into(), into)] stroke_width: Signal<usize>,
#[prop(default = false.into(), into)] absolute_stroke_width: Signal<bool>,
#[prop(optional)] node_ref: NodeRef<Svg>,
) -> impl IntoView {
let stroke_width = Signal::derive(move || {
if absolute_stroke_width.get() {
stroke_width.get() * 24 / size.get()
} else {
stroke_width.get()
}
});
view! {
<svg
node_ref=node_ref
class:lucide=true
xmlns="http://www.w3.org/2000/svg"
width=size
height=size
viewBox="0 0 24 24"
fill=fill
stroke=color
stroke-width=stroke_width
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12.983 21.186a1 1 0 0 1-1.966 0 10 10 0 0 0-8.203-8.203 1 1 0 0 1 0-1.966 10 10 0 0 0 8.203-8.203 1 1 0 0 1 1.966 0 10 10 0 0 0 8.203 8.203 1 1 0 0 1 0 1.966 10 10 0 0 0-8.203 8.203" />
</svg>
}
}
36 changes: 36 additions & 0 deletions packages/leptos/src/folder_bookmark.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn FolderBookmark(
#[prop(default = 24.into(), into)] size: Signal<usize>,
#[prop(default = "currentColor".into(), into)] color: Signal<String>,
#[prop(default = "none".into(), into)] fill: Signal<String>,
#[prop(default = 2.into(), into)] stroke_width: Signal<usize>,
#[prop(default = false.into(), into)] absolute_stroke_width: Signal<bool>,
#[prop(optional)] node_ref: NodeRef<Svg>,
) -> impl IntoView {
let stroke_width = Signal::derive(move || {
if absolute_stroke_width.get() {
stroke_width.get() * 24 / size.get()
} else {
stroke_width.get()
}
});
view! {
<svg
node_ref=node_ref
class:lucide=true
xmlns="http://www.w3.org/2000/svg"
width=size
height=size
viewBox="0 0 24 24"
fill=fill
stroke=color
stroke-width=stroke_width
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 6v8l3-3 3 3V6" />
<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z" />
</svg>
}
}
8 changes: 8 additions & 0 deletions packages/leptos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ mod arrow_up_z_a;
mod arrows_up_from_line;
#[cfg(any(feature = "text", feature = "math", feature = "development"))]
mod asterisk;
#[cfg(any(feature = "shapes", feature = "math"))]
mod astroid;
#[cfg(any(feature = "text", feature = "account"))]
mod at_sign;
#[cfg(feature = "science")]
Expand Down Expand Up @@ -1547,6 +1549,8 @@ mod folder;
#[cfg(feature = "files")]
mod folder_archive;
#[cfg(feature = "files")]
mod folder_bookmark;
#[cfg(feature = "files")]
mod folder_check;
#[cfg(any(feature = "files", feature = "time"))]
mod folder_clock;
Expand Down Expand Up @@ -4519,6 +4523,8 @@ pub use arrow_up_z_a::*;
pub use arrows_up_from_line::*;
#[cfg(any(feature = "text", feature = "math", feature = "development"))]
pub use asterisk::*;
#[cfg(any(feature = "shapes", feature = "math"))]
pub use astroid::*;
#[cfg(any(feature = "text", feature = "account"))]
pub use at_sign::*;
#[cfg(feature = "science")]
Expand Down Expand Up @@ -5842,6 +5848,8 @@ pub use folder::*;
#[cfg(feature = "files")]
pub use folder_archive::*;
#[cfg(feature = "files")]
pub use folder_bookmark::*;
#[cfg(feature = "files")]
pub use folder_check::*;
#[cfg(any(feature = "files", feature = "time"))]
pub use folder_clock::*;
Expand Down
Loading
Loading