//! Small inline icons (oxygenhub#152): 16-unit SVGs drawn in
//! `currentColor`, so they take the colour of the text around them.
/// The opening tag every icon shares.
macro_rules! open {
() => {
r#""#),
"explore" => concat!(open!(), r#""#),
"help" => concat!(
open!(),
r#""#
),
"projects" => concat!(open!(), r#""#),
"bell" => concat!(open!(), r#""#),
"settings" => concat!(
open!(),
r#""#
),
"admin" => concat!(open!(), r#""#),
"dir" => concat!(
open!(),
r#""#
),
"file" => concat!(
open!(),
r#""#
),
"link" => concat!(
open!(),
r#""#
),
"subrepo" => concat!(open!(), r#""#),
"up" => concat!(open!(), r#""#),
"star" => concat!(open!(), r#""#),
"eye" => concat!(
open!(),
r#""#
),
"fork" => concat!(
open!(),
r#""#
),
"history" => concat!(open!(), r#""#),
"drop" => concat!(open!(), r#""#),
_ => "",
}
}
#[cfg(test)]
mod tests {
#[test]
fn every_named_icon_is_one_closed_svg() {
for name in [
"home", "explore", "help", "projects", "bell", "settings", "admin", "dir", "file", "link", "subrepo", "up", "history", "star",
"eye", "fork", "drop",
] {
let s = super::svg(name);
assert!(s.starts_with("