File tree 4 files changed +12
-3
lines changed
4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 2
2
name = " yew_icons"
3
3
authors = [" Finn Bear" ]
4
4
license = " MIT"
5
- version = " 0.8 .0"
5
+ version = " 0.9 .0"
6
6
edition = " 2021"
7
7
repository = " https://github.com/finnbear/yew_icons/"
8
8
description = " Easily include a variety of SVG icons into your Yew app"
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ fn main() {
85
85
86
86
let ( first_tag, remainder) = svg. split_once ( '>' ) . unwrap ( ) ;
87
87
let mut first_tag = first_tag. to_owned ( ) + ">" ;
88
+ let ( remainder, _last_tag) = remainder. rsplit_once ( '<' ) . unwrap ( ) ;
88
89
let remainder = remainder. to_owned ( ) ;
89
90
90
91
assert ! ( first_tag. len( ) > 5 , "{}" , first_tag) ;
@@ -131,7 +132,10 @@ fn main() {
131
132
132
133
let svg = first_tag
133
134
+ "if let Some(title) = title.clone() { <title>{title}</title> }"
134
- + & remainder;
135
+ + & remainder
136
+ // Would work if it weren't for XMLNS
137
+ // + &format!("{{yew::Html::from_html_unchecked(yew::virtual_dom::AttrValue::from(r##\"{remainder}\"##))}}")
138
+ + "</svg>" ;
135
139
let svg_tokens = TokenStream :: from_str ( & svg) . expect ( & path) ;
136
140
137
141
let constant_name = name. to_case ( Case :: UpperSnake ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ use yew::prelude::*;
9
9
#[ cfg( not( feature = "generator" ) ) ]
10
10
use yew:: virtual_dom:: AttrValue ;
11
11
12
+ /// SVG icon design. Enable icon collections, consisting of
13
+ /// associated constants, with feature flags.
12
14
#[ derive( Copy , Clone ) ]
13
15
#[ cfg( not( feature = "generator" ) ) ]
14
16
pub struct IconData {
@@ -43,7 +45,7 @@ impl std::fmt::Debug for IconData {
43
45
}
44
46
}
45
47
46
- /// For customizing icon rendering. Only `icon_id ` is required.
48
+ /// For customizing icon rendering. Only `data ` is required.
47
49
#[ cfg( not( feature = "generator" ) ) ]
48
50
#[ derive( Properties , PartialEq ) ]
49
51
pub struct IconProps {
Original file line number Diff line number Diff line change @@ -42,5 +42,8 @@ yew_icons = { path = "..", features = [
42
42
" heroicons_mini_solid" ,
43
43
" lucide" ,
44
44
" octicons" ,
45
+ # "lipis_flag_icons_1_x_1",
46
+ # "lipis_flag_icons_4_x_3"
47
+ # "simple_icons",
45
48
] }
46
49
wasm-bindgen = " 0.2.84"
You can’t perform that action at this time.
0 commit comments