1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use TokenStream;
/// The icon macro for working with icondata icons.
/// It accepts optional named arguments and generates a Leptos `view!` containing a SVG element.
///
/// # Arguments
///
/// The first parameter must be an icondata id. Some examples may be found here : [Carloskiki's Icondata](https://carloskiki.github.io/icondata/)
///
/// Notice the underscores.
///
/// * `stroke_linecap`
/// * `stroke_linejoin`
/// * `stroke_width`
/// * `width`
/// * `height`
/// * `stroke`
/// * `fill`
/// * `style`
/// * `class`
///
/// # Examples
///
/// ```rust
/// use singlestage::icon;
///
///<Label>
/// {icon!(icondata::FiCreditCard)} "Card"
/// </Label>
///
///<Label>
/// {icon!(icondata::FiCreditCard, width=100, class="mr-3")} "Card"
/// </Label>
/// ```