Skip to content
Merged
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 @@ -2399,6 +2399,12 @@ pub fn IconsC2() -> Element {
},
"Circle Small",
),
(
rsx! {
CircleStar {}
},
"Circle Star",
),
(
rsx! {
CircleStop {}
Expand Down Expand Up @@ -2783,12 +2789,6 @@ pub fn IconsC2() -> Element {
},
"Coffee",
),
(
rsx! {
Cog {}
},
"Cog",
),
];
rsx! {
for (icon , name) in icons {
Expand All @@ -2804,6 +2804,12 @@ pub fn IconsC2() -> Element {
#[component]
pub fn IconsC3() -> Element {
let icons = [
(
rsx! {
Cog {}
},
"Cog",
),
(
rsx! {
Coins {}
Expand Down Expand Up @@ -8765,6 +8771,12 @@ pub fn IconsS2() -> Element {
},
"Square Stack",
),
(
rsx! {
SquareStar {}
},
"Square Star",
),
(
rsx! {
SquareStop {}
Expand Down Expand Up @@ -8897,12 +8909,6 @@ pub fn IconsS2() -> Element {
},
"Store",
),
(
rsx! {
StretchHorizontal {}
},
"Stretch Horizontal",
),
];
rsx! {
for (icon , name) in icons {
Expand All @@ -8918,6 +8924,12 @@ pub fn IconsS2() -> Element {
#[component]
pub fn IconsS3() -> Element {
let icons = [
(
rsx! {
StretchHorizontal {}
},
"Stretch Horizontal",
),
(
rsx! {
StretchVertical {}
Expand Down
2 changes: 2 additions & 0 deletions book-examples/leptos/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ pub fn IconsC() -> impl IntoView {
(view! { <CircleSlash /> }.into_any(), "Circle Slash"),
(view! { <CircleSlash2 /> }.into_any(), "Circle Slash 2"),
(view! { <CircleSmall /> }.into_any(), "Circle Small"),
(view! { <CircleStar /> }.into_any(), "Circle Star"),
(view! { <CircleStop /> }.into_any(), "Circle Stop"),
(view! { <CircleUser /> }.into_any(), "Circle User"),
(view! { <CircleUserRound /> }.into_any(), "Circle User Round"),
Expand Down Expand Up @@ -1798,6 +1799,7 @@ pub fn IconsS() -> impl IntoView {
(view! { <SquareSplitVertical /> }.into_any(), "Square Split Vertical"),
(view! { <SquareSquare /> }.into_any(), "Square Square"),
(view! { <SquareStack /> }.into_any(), "Square Stack"),
(view! { <SquareStar /> }.into_any(), "Square Star"),
(view! { <SquareStop /> }.into_any(), "Square Stop"),
(view! { <SquareTerminal /> }.into_any(), "Square Terminal"),
(view! { <SquareUser /> }.into_any(), "Square User"),
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 @@ -532,6 +532,7 @@ pub fn IconsC() -> Html {
(html! { <CircleSlash /> }, "Circle Slash"),
(html! { <CircleSlash2 /> }, "Circle Slash 2"),
(html! { <CircleSmall /> }, "Circle Small"),
(html! { <CircleStar /> }, "Circle Star"),
(html! { <CircleStop /> }, "Circle Stop"),
(html! { <CircleUser /> }, "Circle User"),
(html! { <CircleUserRound /> }, "Circle User Round"),
Expand Down Expand Up @@ -1844,6 +1845,7 @@ pub fn IconsS() -> Html {
(html! { <SquareSplitVertical /> }, "Square Split Vertical"),
(html! { <SquareSquare /> }, "Square Square"),
(html! { <SquareStack /> }, "Square Stack"),
(html! { <SquareStar /> }, "Square Star"),
(html! { <SquareStop /> }, "Square Stop"),
(html! { <SquareTerminal /> }, "Square Terminal"),
(html! { <SquareUser /> }, "Square User"),
Expand Down
41 changes: 41 additions & 0 deletions packages/dioxus/src/circle_star.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct CircleStarProps {
#[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 CircleStar(props: CircleStarProps) -> 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": "M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" }
circle { "cx": "12", "cy": "12", "r": "10" }
}
}
}
8 changes: 8 additions & 0 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ mod circle_slash;
mod circle_slash_2;
#[cfg(any(feature = "shapes", feature = "medical"))]
mod circle_small;
#[cfg(any(feature = "sports", feature = "gaming"))]
mod circle_star;
#[cfg(feature = "multimedia")]
mod circle_stop;
#[cfg(feature = "account")]
Expand Down Expand Up @@ -3536,6 +3538,8 @@ mod square_split_vertical;
mod square_square;
#[cfg(any(feature = "text", feature = "files", feature = "development"))]
mod square_stack;
#[cfg(any(feature = "sports", feature = "gaming"))]
mod square_star;
#[cfg(feature = "multimedia")]
mod square_stop;
#[cfg(feature = "development")]
Expand Down Expand Up @@ -5035,6 +5039,8 @@ pub use circle_slash::*;
pub use circle_slash_2::*;
#[cfg(any(feature = "shapes", feature = "medical"))]
pub use circle_small::*;
#[cfg(any(feature = "sports", feature = "gaming"))]
pub use circle_star::*;
#[cfg(feature = "multimedia")]
pub use circle_stop::*;
#[cfg(feature = "account")]
Expand Down Expand Up @@ -7669,6 +7675,8 @@ pub use square_split_vertical::*;
pub use square_square::*;
#[cfg(any(feature = "text", feature = "files", feature = "development"))]
pub use square_stack::*;
#[cfg(any(feature = "sports", feature = "gaming"))]
pub use square_star::*;
#[cfg(feature = "multimedia")]
pub use square_stop::*;
#[cfg(feature = "development")]
Expand Down
10 changes: 5 additions & 5 deletions packages/dioxus/src/school.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ pub fn School(props: SchoolProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M14 22v-4a2 2 0 1 0-4 0v4" }
path { "d": "m18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10" }
path { "d": "M18 5v17" }
path { "d": "m4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6" }
path { "d": "M6 5v17" }
path { "d": "M14 21v-3a2 2 0 0 0-4 0v3" }
path { "d": "M18 5v16" }
path { "d": "m4 6 7.106-3.79a2 2 0 0 1 1.788 0L20 6" }
path { "d": "m6 11-3.52 2.147a1 1 0 0 0-.48.854V19a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a1 1 0 0 0-.48-.853L18 11" }
path { "d": "M6 5v16" }
circle { "cx": "12", "cy": "9", "r": "2" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dioxus/src/spade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub fn Spade(props: SpadeProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7Z" }
path { "d": "M12 18v4" }
path { "d": "M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5" }
}
}
}
47 changes: 47 additions & 0 deletions packages/dioxus/src/square_star.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct SquareStarProps {
#[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 SquareStar(props: SquareStarProps) -> 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": "M11.035 7.69a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.866l-1.156-1.153a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" }
rect {
"x": "3",
"y": "3",
"width": "18",
"height": "18",
"rx": "2",
}
}
}
}
36 changes: 36 additions & 0 deletions packages/leptos/src/circle_star.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn CircleStar(
#[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="M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" />
<circle cx="12" cy="12" r="10" />
</svg>
}
}
8 changes: 8 additions & 0 deletions packages/leptos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ mod circle_slash;
mod circle_slash_2;
#[cfg(any(feature = "shapes", feature = "medical"))]
mod circle_small;
#[cfg(any(feature = "sports", feature = "gaming"))]
mod circle_star;
#[cfg(feature = "multimedia")]
mod circle_stop;
#[cfg(feature = "account")]
Expand Down Expand Up @@ -3536,6 +3538,8 @@ mod square_split_vertical;
mod square_square;
#[cfg(any(feature = "text", feature = "files", feature = "development"))]
mod square_stack;
#[cfg(any(feature = "sports", feature = "gaming"))]
mod square_star;
#[cfg(feature = "multimedia")]
mod square_stop;
#[cfg(feature = "development")]
Expand Down Expand Up @@ -5035,6 +5039,8 @@ pub use circle_slash::*;
pub use circle_slash_2::*;
#[cfg(any(feature = "shapes", feature = "medical"))]
pub use circle_small::*;
#[cfg(any(feature = "sports", feature = "gaming"))]
pub use circle_star::*;
#[cfg(feature = "multimedia")]
pub use circle_stop::*;
#[cfg(feature = "account")]
Expand Down Expand Up @@ -7669,6 +7675,8 @@ pub use square_split_vertical::*;
pub use square_square::*;
#[cfg(any(feature = "text", feature = "files", feature = "development"))]
pub use square_stack::*;
#[cfg(any(feature = "sports", feature = "gaming"))]
pub use square_star::*;
#[cfg(feature = "multimedia")]
pub use square_stop::*;
#[cfg(feature = "development")]
Expand Down
10 changes: 5 additions & 5 deletions packages/leptos/src/school.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ pub fn School(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M14 22v-4a2 2 0 1 0-4 0v4" />
<path d="m18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10" />
<path d="M18 5v17" />
<path d="m4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6" />
<path d="M6 5v17" />
<path d="M14 21v-3a2 2 0 0 0-4 0v3" />
<path d="M18 5v16" />
<path d="m4 6 7.106-3.79a2 2 0 0 1 1.788 0L20 6" />
<path d="m6 11-3.52 2.147a1 1 0 0 0-.48.854V19a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5a1 1 0 0 0-.48-.853L18 11" />
<path d="M6 5v16" />
<circle cx="12" cy="9" r="2" />
</svg>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/leptos/src/spade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ pub fn Spade(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7Z" />
<path d="M12 18v4" />
<path d="M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5" />
</svg>
}
}
36 changes: 36 additions & 0 deletions packages/leptos/src/square_star.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn SquareStar(
#[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="M11.035 7.69a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.866l-1.156-1.153a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z" />
<rect x="3" y="3" width="18" height="18" rx="2" />
</svg>
}
}
Loading
Loading