reqtk 0.2.0

ReqTk is a requirements management toolkit built around a human-readable, git-friendly `.req` file format.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::*;
pub struct IconProvider;

impl IconProvider {
    pub fn get_material_icon(name: &str, color: &str) -> Option<String> {
        MATERIAL_ICONS.get(name).map(|path| format!(
            r#"<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path d="{}" fill="{}"/></svg>"#,
            path,
            color.replace("\"", "\\\"")
        ))
    }
}