Skip to main content

md_icons/
lib.rs

1//! Crate for using material design (SVG-) icons from
2//! https://github.com/marella/material-design-icons as String constants or as maud
3//! components.
4//!
5//! The icons have four different style: filled, outlined, sharp or two_tone. These are directly
6//! represented as modules in this crate. You can get an overview of the icons at
7//! [Google fonts](https://fonts.google.com/icons).
8//!
9//! ## Example
10//!
11//! Get the SVG as a string:
12//!
13//! ```rust
14//! let hamburger_menu = md_icons::outlined::ICON_MENU;
15//! ```
16//!
17//! ... or get it as a ``maud::Markup`` with the ``maud`` feature enabled:
18//!
19//! ```rust
20//! let hamburger_menu = md_icons::outlined::maud_icon_menu();
21//! ```
22
23#[cfg(feature = "maud")]
24extern crate maud;
25
26extern crate md_icons_helper;
27
28pub mod filled;
29/// Outlined icons. See https://fonts.google.com/icons?icon.style=Outlined
30pub mod outlined;
31/// Sharp icons. See https://fonts.google.com/icons?icon.style=Sharp
32pub mod sharp;
33pub mod two_tone;
34
35#[cfg(test)]
36mod tests;