Skip to content

Commit

Permalink
Add examples for ListGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
CraftSpider committed Oct 30, 2023
1 parent 571b764 commit e8d1aec
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/basics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,26 @@ impl Component for Model {
<Button style={Color::Primary}>{"Primary"}</Button>
<Button style={Color::Secondary}>{"Secondary"}</Button>
</ButtonGroup>

<h1>{"List groups"}</h1>
<ListGroup>
<ListGroupItem>{"A"}</ListGroupItem>
<ListGroupItem active=true>{"B"}</ListGroupItem>
<ListGroupItem disabled=true>{"C"}</ListGroupItem>
</ListGroup>

<h2>{"Flush and with numbers"}</h2>
<ListGroup variant={ListGroupVariant::Flush} numbered=true>
<ListGroupItem style={Color::Primary}>{"Primary"}</ListGroupItem>
<ListGroupItem action=true style={Color::Secondary} url="#ref">{"Secondary w/ link"}</ListGroupItem>
<ListGroupItem action=true style={Color::Info}>{"Secondary w/ action"}</ListGroupItem>
</ListGroup>

<h2>{"Horizontal"}</h2>
<ListGroup horizontal={SizeTrigger::Always}>
<ListGroupItem action=true active=true>{"Active action"}</ListGroupItem>
<ListGroupItem action=true disabled=true>{"Disabled action"}</ListGroupItem>
</ListGroup>
</div>
<div id="helpers" class="p-3">
<h1>{"Vertical/Horizontal rule"}</h1>
Expand Down

0 comments on commit e8d1aec

Please sign in to comment.