Macro row_ui

Source
macro_rules! row_ui {
    ($args:expr $(, $child:expr)* $(,)?) => { ... };
}
Expand description

A declarative macro to simplify the creation of a row component.

The first argument is the RowArgs struct, followed by a variable number of child components. Each child expression will be converted to a RowItem using the AsRowItem trait. This allows passing closures, RowItem instances, or (FnOnce, weight) tuples.

ยงExample

use tessera_ui_basic_components::{row::{row_ui, RowArgs, RowItem}, text::text};

row_ui![
    RowArgs::default(),
    || text("Hello".to_string()), // Closure
    (|| text("Weighted".to_string()), 0.5), // Weighted closure
    RowItem::new(Box::new(|| text("Item".to_string())), None) // RowItem instance
];