pub struct Button {
pub common: Common,
pub label: Line,
pub action: ActionId,
pub value: Option<Value>,
pub variant: Option<ButtonVariant>,
pub icon: Option<Icon>,
pub disabled: Option<bool>,
pub confirm: Option<String>,
}Expand description
A button (§4.5.2). Fires its action with value (§4.6); confirm shows an
inline y/n popover first.
Fields§
§common: CommonCommon node props (key, style, block, fallback).
label: LineButton label.
action: ActionIdAction id fired on click.
value: Option<Value>Action value (default null).
variant: Option<ButtonVariant>Visual weight.
icon: Option<Icon>Leading icon (required for Danger in the app).
disabled: Option<bool>Greyed out.
confirm: Option<String>Ask for confirmation first.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Button
impl<'de> Deserialize<'de> for Button
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Button
Source§impl WithCommon for Button
impl WithCommon for Button
Source§fn common_mut(&mut self) -> &mut Common
fn common_mut(&mut self) -> &mut Common
Mutable access to the node’s common props.
Source§fn block(self, block: impl Into<BlockProps>) -> Self
fn block(self, block: impl Into<BlockProps>) -> Self
Sets the surrounding block.
Auto Trait Implementations§
impl Freeze for Button
impl RefUnwindSafe for Button
impl Send for Button
impl Sync for Button
impl Unpin for Button
impl UnsafeUnpin for Button
impl UnwindSafe for Button
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more