-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ListGroup): Add horizontal prop (#1715)
- Loading branch information
1 parent
546b15c
commit 284a543
Showing
4 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { ListGroup, ListGroupItem } from 'reactstrap'; | ||
|
||
const Example = (props) => { | ||
return ( | ||
<div> | ||
<p>The <code>horizontal</code> prop can be a Boolean or a string specifying one of Bootstrap's breakpoints</p> | ||
<ListGroup horizontal> | ||
<ListGroupItem tag="a" href="#">Cras justo odio</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Dapibus ac facilisis in</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Morbi leo risus</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Porta ac consectetur ac</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Vestibulum at eros</ListGroupItem> | ||
</ListGroup> | ||
<p className="mt-3">This list group is horizontal at the <code>lg</code> breakpoint and up.</p> | ||
<ListGroup horizontal="lg"> | ||
<ListGroupItem tag="a" href="#">Cras justo odio</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Dapibus ac facilisis in</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Morbi leo risus</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Porta ac consectetur ac</ListGroupItem> | ||
<ListGroupItem tag="a" href="#">Vestibulum at eros</ListGroupItem> | ||
</ListGroup> | ||
<p className="mt-3">Note that horizontal list groups cannot be combined with flush list groups. If <code>flush</code> is <code>true</code> then <code>horizontal</code> has no effect.</p> | ||
</div> | ||
|
||
); | ||
} | ||
|
||
export default Example; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters