pub struct ListGroupItemProps {
pub active: bool,
pub disabled: bool,
pub color: Option<Color>,
pub onclick: Option<EventHandler<MouseEvent>>,
pub tag: String,
pub class: String,
pub children: Element,
/* private fields */
}Expand description
Bootstrap ListGroupItem component.
Fields§
§active: boolActive state.
disabled: boolDisabled state.
color: Option<Color>Item color variant.
onclick: Option<EventHandler<MouseEvent>>Click event handler. With the default tag, this renders the item as a
<button> — Bootstrap’s actionable form.
tag: StringItem element. Empty (the default) renders <li>, or <button> when
onclick is set; "div" renders <div class="list-group-item">, the
generic form.
"div" is honoured even with onclick. A <button> may not contain
interactive descendants, so a clickable row that holds its own input or
buttons cannot be one — the browser’s tag-soup recovery reparents them and
the controls stop working. Such a row is an ordinary element carrying an
ordinary handler, which is what the escape hatches are for; it still gets
list-group-item-action, because that class is what Bootstrap defines for
the look, and the caller has said this row is actionable by handing it a
handler.
class: StringAdditional CSS classes.
children: ElementChild elements.
Implementations§
Source§impl ListGroupItemProps
impl ListGroupItemProps
Sourcepub fn builder() -> ListGroupItemPropsBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> ListGroupItemPropsBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building ListGroupItemProps.
On the builder, call .active(...)(optional), .disabled(...)(optional), .color(...)(optional), .onclick(...)(optional), .tag(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ListGroupItemProps.
Trait Implementations§
Source§impl Clone for ListGroupItemProps
impl Clone for ListGroupItemProps
Source§fn clone(&self) -> ListGroupItemProps
fn clone(&self) -> ListGroupItemProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more