Skip to content

Commit 0f6582f

Browse files
committed
Use String for <Symbol> id instead of &'static str.
1 parent 1a56744 commit 0f6582f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ pub fn Icon(
9090
pub fn Symbol(
9191
/// Id of the symbol for later refernce.
9292
/// Used as the `href` property in a `<use>` element.
93-
id: &'static str,
93+
#[prop(into)]
94+
id: String,
9495
/// The icon to render.
9596
#[prop(into)]
9697
icon: Signal<icondata_core::Icon>,
@@ -105,7 +106,7 @@ pub fn Symbol(
105106
(None, Some(b)) => Some(b.to_string()),
106107
_ => None,
107108
})
108-
.attr("id", id)
109+
.attr("id", id.clone())
109110
.attr("x", icon.x)
110111
.attr("y", icon.y)
111112
.attr("viewBox", icon.view_box)

0 commit comments

Comments
 (0)