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
41
42
43
44
45
46
47
48
49
50
51
use crate::def_attribute;

def_attribute!(
    svg_data,
    svg_content,
    /// The `fill` attributes allows you to specify the fill or stroke color for the `svg`.
    ///
    /// You can learn about the syntax of this attribute in [`Color Syntax`](crate::_docs::color_syntax).
    ///
    /// ### Example
    ///
    /// ```rust, no_run
    /// # use freya::prelude::*;
    /// fn app() -> Element {
    ///     let svg_content = include_str!("../../../../examples/settings.svg");
    ///
    ///     rsx!(
    ///         svg {
    ///             fill: "red",
    ///             width: "100%",
    ///             height: "100%",
    ///             svg_content,
    ///         }
    ///     )
    /// }
    /// ```
    fill,

    /// The `stroke` attributes allows you to specify the fill or stroke color for the `svg`.
    ///
    /// You can learn about the syntax of this attribute in [`Color Syntax`](crate::_docs::color_syntax).
    ///
    /// ### Example
    ///
    /// ```rust, no_run
    /// # use freya::prelude::*;
    /// fn app() -> Element {
    ///     let svg_content = include_str!("../../../../examples/settings.svg");
    ///
    ///     rsx!(
    ///         svg {
    ///             stroke: "red",
    ///             width: "100%",
    ///             height: "100%",
    ///             svg_content,
    ///         }
    ///     )
    /// }
    /// ```
    stroke,
);