From 43e3f93aad66fb194eae862b8fba29ee88512605 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 4 Apr 2021 14:15:06 -0700 Subject: [PATCH] + Handful of useful macros/functions that are used basically everywhere ! There's no real order to these as they are mostly miscellaneous --- tui/src/common.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tui/src/common.rs diff --git a/tui/src/common.rs b/tui/src/common.rs new file mode 100644 index 0000000..fa1ef1e --- /dev/null +++ b/tui/src/common.rs @@ -0,0 +1,13 @@ +#[macro_export] +macro_rules! bold { + ($text:expr) => { + Span::styled($text, Style::default().add_modifier(Modifier::BOLD)) + } +} + +#[macro_export] +macro_rules! normal { + ($text:expr) => { + Span::raw($text) + } +}