A tab of a tab bar.
Put tabs in a tab_bar; the chosen one has the bar under it.
Signature
pub const fn tab<M>(text: &str, selected: bool) -> Tab<'_, M>Methods
.on_select(message: M) -> Self— Sendsmessagewhen it is chosen..icon(icon: fusuma_icons::Icon) -> Self— An icon before the text.
Example
use fusuma::{tab, tab_bar};
let view = tab_bar((tab("Day", true).on_select(0), tab("Week", false).on_select(1)));
let built = fusuma::doc::built::<i32, _>(&view);
assert_eq!(built.texts(), ["Day", "Week"]);