We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 979bb25 commit 38510d6Copy full SHA for 38510d6
packages/lib/src/icon_component.rs
@@ -25,8 +25,7 @@ pub struct IconProps<T: IconShape + Clone + PartialEq + 'static> {
25
#[props(default = "".to_string())]
26
pub class: String,
27
/// An accessible, short-text description for the icon.
28
- #[props(default = "".to_string())]
29
- pub title: String,
+ pub title: Option<String>,
30
}
31
32
/// Icon component which generates SVG elements
@@ -42,9 +41,11 @@ pub fn Icon<T: IconShape + Clone + PartialEq + 'static>(props: IconProps<T>) ->
42
41
xmlns: "{props.icon.xmlns()}",
43
fill: "{props.fill}",
44
stroke: "{props.fill}",
45
- title {
46
- "{props.title}"
47
- }
+ if let Some(title_text) = props.title {
+ title {
+ "{title_text}"
+ }
48
+ },
49
{props.icon.child_elements()}
50
51
)
0 commit comments