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
18 changes: 12 additions & 6 deletions book-examples/dioxus/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6288,6 +6288,12 @@ pub fn IconsM1() -> Element {
},
"Moon Star",
),
(
rsx! {
Motorbike {}
},
"Motorbike",
),
(
rsx! {
Mountain {}
Expand All @@ -6312,12 +6318,6 @@ pub fn IconsM1() -> Element {
},
"Mouse Off",
),
(
rsx! {
MousePointer {}
},
"Mouse Pointer",
),
];
rsx! {
for (icon , name) in icons {
Expand All @@ -6333,6 +6333,12 @@ pub fn IconsM1() -> Element {
#[component]
pub fn IconsM2() -> Element {
let icons = [
(
rsx! {
MousePointer {}
},
"Mouse Pointer",
),
(
rsx! {
MousePointer2 {}
Expand Down
1 change: 1 addition & 0 deletions book-examples/leptos/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,7 @@ pub fn IconsM() -> impl IntoView {
(view! { <MonitorX /> }.into_any(), "Monitor X"),
(view! { <Moon /> }.into_any(), "Moon"),
(view! { <MoonStar /> }.into_any(), "Moon Star"),
(view! { <Motorbike /> }.into_any(), "Motorbike"),
(view! { <Mountain /> }.into_any(), "Mountain"),
(view! { <MountainSnow /> }.into_any(), "Mountain Snow"),
(view! { <Mouse /> }.into_any(), "Mouse"),
Expand Down
1 change: 1 addition & 0 deletions book-examples/yew/src/icons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ pub fn IconsM() -> Html {
(html! { <MonitorX /> }, "Monitor X"),
(html! { <Moon /> }, "Moon"),
(html! { <MoonStar /> }, "Moon Star"),
(html! { <Motorbike /> }, "Motorbike"),
(html! { <Mountain /> }, "Mountain"),
(html! { <MountainSnow /> }, "Mountain Snow"),
(html! { <Mouse /> }, "Mouse"),
Expand Down
12 changes: 5 additions & 7 deletions packages/dioxus/src/building_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ pub fn Building2(props: Building2Props) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }
path { "d": "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }
path { "d": "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }
path { "d": "M10 6h4" }
path { "d": "M10 10h4" }
path { "d": "M10 14h4" }
path { "d": "M10 18h4" }
path { "d": "M10 12h4" }
path { "d": "M10 8h4" }
path { "d": "M14 21v-3a2 2 0 0 0-4 0v3" }
path { "d": "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2" }
path { "d": "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16" }
}
}
}
24 changes: 12 additions & 12 deletions packages/dioxus/src/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ pub fn Combine(props: CombineProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M10 18H5a3 3 0 0 1-3-3v-1" }
path { "d": "M14 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" }
path { "d": "M20 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" }
path { "d": "m7 21 3-3-3-3" }
path { "d": "M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }
path { "d": "M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }
path { "d": "m7 15 3 3" }
path { "d": "m7 21 3-3H5a2 2 0 0 1-2-2v-2" }
rect {
"x": "14",
"y": "14",
"width": "8",
"height": "8",
"rx": "2",
"width": "7",
"height": "7",
"rx": "1",
}
rect {
"x": "2",
"y": "2",
"width": "8",
"height": "8",
"rx": "2",
"x": "3",
"y": "3",
"width": "7",
"height": "7",
"rx": "1",
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dioxus/src/flame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn Flame(props: FlameProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z" }
path { "d": "M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" }
}
}
}
4 changes: 4 additions & 0 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2417,6 +2417,8 @@ mod monitor_x;
mod moon;
#[cfg(any(feature = "accessibility", feature = "weather"))]
mod moon_star;
#[cfg(feature = "transportation")]
mod motorbike;
#[cfg(any(feature = "nature", feature = "gaming"))]
mod mountain;
#[cfg(feature = "nature")]
Expand Down Expand Up @@ -6576,6 +6578,8 @@ pub use monitor_x::*;
pub use moon::*;
#[cfg(any(feature = "accessibility", feature = "weather"))]
pub use moon_star::*;
#[cfg(feature = "transportation")]
pub use motorbike::*;
#[cfg(any(feature = "nature", feature = "gaming"))]
pub use mountain::*;
#[cfg(feature = "nature")]
Expand Down
44 changes: 44 additions & 0 deletions packages/dioxus/src/motorbike.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
use dioxus::prelude::*;
#[derive(Clone, PartialEq, Props)]
pub struct MotorbikeProps {
#[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 Motorbike(props: MotorbikeProps) -> 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": "m18 14-1-3" }
path { "d": "m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81" }
path { "d": "M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5" }
circle { "cx": "19", "cy": "17", "r": "3" }
circle { "cx": "5", "cy": "17", "r": "3" }
}
}
}
18 changes: 9 additions & 9 deletions packages/dioxus/src/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ pub fn Replace(props: ReplaceProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M14 4a2 2 0 0 1 2-2" }
path { "d": "M16 10a2 2 0 0 1-2-2" }
path { "d": "M20 2a2 2 0 0 1 2 2" }
path { "d": "M22 8a2 2 0 0 1-2 2" }
path { "d": "M14 4a1 1 0 0 1 1-1" }
path { "d": "M15 10a1 1 0 0 1-1-1" }
path { "d": "M21 4a1 1 0 0 0-1-1" }
path { "d": "M21 9a1 1 0 0 1-1 1" }
path { "d": "m3 7 3 3 3-3" }
path { "d": "M6 10V5a3 3 0 0 1 3-3h1" }
path { "d": "M6 10V5a2 2 0 0 1 2-2h2" }
rect {
"x": "2",
"x": "3",
"y": "14",
"width": "8",
"height": "8",
"rx": "2",
"width": "7",
"height": "7",
"rx": "1",
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions packages/dioxus/src/replace_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ pub fn ReplaceAll(props: ReplaceAllProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M14 14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" }
path { "d": "M14 4a2 2 0 0 1 2-2" }
path { "d": "M16 10a2 2 0 0 1-2-2" }
path { "d": "M20 14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" }
path { "d": "M20 2a2 2 0 0 1 2 2" }
path { "d": "M22 8a2 2 0 0 1-2 2" }
path { "d": "M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }
path { "d": "M14 4a1 1 0 0 1 1-1" }
path { "d": "M15 10a1 1 0 0 1-1-1" }
path { "d": "M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" }
path { "d": "M21 4a1 1 0 0 0-1-1" }
path { "d": "M21 9a1 1 0 0 1-1 1" }
path { "d": "m3 7 3 3 3-3" }
path { "d": "M6 10V5a 3 3 0 0 1 3-3h1" }
path { "d": "M6 10V5a2 2 0 0 1 2-2h2" }
rect {
"x": "2",
"x": "3",
"y": "14",
"width": "8",
"height": "8",
"rx": "2",
"width": "7",
"height": "7",
"rx": "1",
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/dioxus/src/square_m.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ pub fn SquareM(props: SquareMProps) -> Element {
"stroke-width": "{stroke_width}",
"stroke-linecap": "round",
"stroke-linejoin": "round",
path { "d": "M8 16V8.5a.5.5 0 0 1 .9-.3l2.7 3.599a.5.5 0 0 0 .8 0l2.7-3.6a.5.5 0 0 1 .9.3V16" }
rect {
"width": "18",
"height": "18",
"x": "3",
"y": "3",
"width": "18",
"height": "18",
"rx": "2",
}
path { "d": "M8 16V8l4 4 4-4v8" }
}
}
}
12 changes: 5 additions & 7 deletions packages/leptos/src/building_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ pub fn Building2(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" />
<path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" />
<path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" />
<path d="M10 6h4" />
<path d="M10 10h4" />
<path d="M10 14h4" />
<path d="M10 18h4" />
<path d="M10 12h4" />
<path d="M10 8h4" />
<path d="M14 21v-3a2 2 0 0 0-4 0v3" />
<path d="M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2" />
<path d="M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16" />
</svg>
}
}
12 changes: 6 additions & 6 deletions packages/leptos/src/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ pub fn Combine(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M10 18H5a3 3 0 0 1-3-3v-1" />
<path d="M14 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" />
<path d="M20 2a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2" />
<path d="m7 21 3-3-3-3" />
<rect x="14" y="14" width="8" height="8" rx="2" />
<rect x="2" y="2" width="8" height="8" rx="2" />
<path d="M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" />
<path d="M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1" />
<path d="m7 15 3 3" />
<path d="m7 21 3-3H5a2 2 0 0 1-2-2v-2" />
<rect x="14" y="14" width="7" height="7" rx="1" />
<rect x="3" y="3" width="7" height="7" rx="1" />
</svg>
}
}
2 changes: 1 addition & 1 deletion packages/leptos/src/flame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn Flame(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z" />
<path d="M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" />
</svg>
}
}
4 changes: 4 additions & 0 deletions packages/leptos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2417,6 +2417,8 @@ mod monitor_x;
mod moon;
#[cfg(any(feature = "accessibility", feature = "weather"))]
mod moon_star;
#[cfg(feature = "transportation")]
mod motorbike;
#[cfg(any(feature = "nature", feature = "gaming"))]
mod mountain;
#[cfg(feature = "nature")]
Expand Down Expand Up @@ -6576,6 +6578,8 @@ pub use monitor_x::*;
pub use moon::*;
#[cfg(any(feature = "accessibility", feature = "weather"))]
pub use moon_star::*;
#[cfg(feature = "transportation")]
pub use motorbike::*;
#[cfg(any(feature = "nature", feature = "gaming"))]
pub use mountain::*;
#[cfg(feature = "nature")]
Expand Down
39 changes: 39 additions & 0 deletions packages/leptos/src/motorbike.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
use leptos::{prelude::*, svg::Svg};
#[component]
pub fn Motorbike(
#[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="m18 14-1-3" />
<path d="m3 9 6 2a2 2 0 0 1 2-2h2a2 2 0 0 1 1.99 1.81" />
<path d="M8 17h3a1 1 0 0 0 1-1 6 6 0 0 1 6-6 1 1 0 0 0 1-1v-.75A5 5 0 0 0 17 5" />
<circle cx="19" cy="17" r="3" />
<circle cx="5" cy="17" r="3" />
</svg>
}
}
12 changes: 6 additions & 6 deletions packages/leptos/src/replace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ pub fn Replace(
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M14 4a2 2 0 0 1 2-2" />
<path d="M16 10a2 2 0 0 1-2-2" />
<path d="M20 2a2 2 0 0 1 2 2" />
<path d="M22 8a2 2 0 0 1-2 2" />
<path d="M14 4a1 1 0 0 1 1-1" />
<path d="M15 10a1 1 0 0 1-1-1" />
<path d="M21 4a1 1 0 0 0-1-1" />
<path d="M21 9a1 1 0 0 1-1 1" />
<path d="m3 7 3 3 3-3" />
<path d="M6 10V5a3 3 0 0 1 3-3h1" />
<rect x="2" y="14" width="8" height="8" rx="2" />
<path d="M6 10V5a2 2 0 0 1 2-2h2" />
<rect x="3" y="14" width="7" height="7" rx="1" />
</svg>
}
}
Loading