feat: add text macro to widget::helpers
This commit is contained in:
parent
f409037c07
commit
6146382676
1 changed files with 13 additions and 0 deletions
|
|
@ -51,6 +51,19 @@ macro_rules! row {
|
|||
);
|
||||
}
|
||||
|
||||
/// Creates a new [`Text`] widget with the provided content.
|
||||
///
|
||||
/// [`Text`]: core::widget::Text
|
||||
#[macro_export]
|
||||
macro_rules! text {
|
||||
() => (
|
||||
$crate::Text::new()
|
||||
);
|
||||
($($arg:tt)*) => {
|
||||
$crate::Text::new(format!($($arg)*))
|
||||
};
|
||||
}
|
||||
|
||||
/// Creates a new [`Container`] with the provided content.
|
||||
///
|
||||
/// [`Container`]: crate::Container
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue