pub struct MessageProps {
pub classes: Signal<String>,
pub closable: Signal<bool>,
pub test_attr: Option<TestAttr>,
pub children: Children,
}Expand description
Props for the Message component.
Colored message blocks, to emphasize part of your page. https://bulma.io/documentation/components/message/
§Required Props
- children:
Children- Child content of the message (usually MessageHeader and MessageBody).
§Optional Props
- classes:
impl Into<Signal<String>>- Extra classes to apply to the Bulma “message” container (e.g., is-primary, is-warning).
- closable:
impl Into<Signal<bool>>- When true, renders a close button in the top-right that hides the entire message when clicked.
- test_attr:
impl Into<TestAttr>-
Optional test attribute (renders as data-* attribute) on the root
. When provided as a &str or String, this becomes
data-testid="value". You can also pass a fullTestAttrto override the attribute key.
-
Fields§
§classes: Signal<String>Extra classes to apply to the Bulma “message” container (e.g., is-primary, is-warning).
closable: Signal<bool>When true, renders a close button in the top-right that hides the entire message when clicked.
test_attr: Option<TestAttr>Optional test attribute (renders as data-* attribute) on the root
When provided as a &str or String, this becomes data-testid="value".
You can also pass a full TestAttr to override the attribute key.
children: ChildrenChild content of the message (usually MessageHeader and MessageBody).
Implementations§
Source§impl MessageProps
impl MessageProps
Sourcepub fn builder() -> MessagePropsBuilder<((), (), (), ())>
pub fn builder() -> MessagePropsBuilder<((), (), (), ())>
Create a builder for building MessageProps.
On the builder, call .classes(...)(optional), .closable(...)(optional), .test_attr(...)(optional), .children(...) to set the values of the fields.
Finally, call .build() to create the instance of MessageProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MessageProps
impl !RefUnwindSafe for MessageProps
impl Send for MessageProps
impl !Sync for MessageProps
impl Unpin for MessageProps
impl UnsafeUnpin for MessageProps
impl !UnwindSafe for MessageProps
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more