A round button with an icon, in the main action's colour: the one thing a screen is for (compose, add). With a label it is an extended one.
Signature
pub fn fab<M>(icon: Icon, label: &str) -> Button<'_, M>Methods
.primary() -> Self— The main action's look..ghost() -> Self— A quiet look: no fill and no outline until the pointer is over it..danger() -> Self— For what cannot be taken back: filled with the danger colour..tonal() -> Self— A softer main action: the brand colour thinned out, with the brand colour for the label..on_press(message: M) -> Self— Sendsmessagewhen pressed..enabled(enabled: bool) -> Self— Whether it can be used (it is by default)..icon_filled(filled: bool) -> Self— Fills in the icon (its closed shapes as well as its outline): a chosen state, a liked heart..icon(icon: fusuma_icons::Icon) -> Self— An icon before the text.
Example
use fusuma::{Icon, fab};
let view = fab(Icon::Plus, "New").on_press(());
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["New"]);