-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
437 additions
and
78 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
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,117 @@ | ||
import React, {Component} from 'react'; | ||
import { | ||
Alert, | ||
Button, | ||
Grid, | ||
Row, | ||
Col, | ||
Label, | ||
Well, | ||
PageHeader, | ||
NavItem, | ||
Nav, | ||
Badge | ||
} from 'react-bootstrap'; | ||
|
||
class Alerts extends React.Component { | ||
|
||
render() { | ||
|
||
/** | ||
* Nav with badges / Pills | ||
*/ | ||
|
||
function handleSelect(selectedKey) { | ||
alert(`selected ${selectedKey}`); | ||
} | ||
|
||
const navInstance = ( | ||
<Nav bsStyle="pills" activeKey={1} onSelect={handleSelect}> | ||
<NavItem eventKey={1} href="/home"> | ||
Home <Badge>42</Badge> | ||
</NavItem> | ||
<NavItem eventKey={2} title="Item"> | ||
Profile | ||
</NavItem> | ||
<NavItem eventKey={3} disabled> | ||
Messages <Badge>3</Badge> | ||
</NavItem> | ||
</Nav> | ||
); | ||
|
||
/** | ||
* Lables | ||
*/ | ||
|
||
const Labels = ( | ||
<div> | ||
<Label bsStyle="default">Default</Label>{' '} | ||
<Label bsStyle="primary">Primary</Label>{' '} | ||
<Label bsStyle="success">Success</Label>{' '} | ||
<Label bsStyle="info">Info</Label>{' '} | ||
<Label bsStyle="warning">Warning</Label>{' '} | ||
<Label bsStyle="danger">Danger</Label> | ||
</div> | ||
); | ||
|
||
return (<div className="_black"> | ||
<Grid> | ||
<Row> | ||
<Col sm={12}> | ||
<PageHeader className="white"> | ||
Indicators | ||
</PageHeader> | ||
<Well className="_white"> | ||
<h4>Oh snap! You got an error!</h4> | ||
<p> | ||
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. | ||
</p> | ||
</Well> | ||
<Alert bsStyle="success"> | ||
<h4>Oh snap! You got an error!</h4> | ||
<p> | ||
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. | ||
</p> | ||
</Alert> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col sm={4}> | ||
<Alert bsStyle="info"> | ||
<h4>Oh snap! You got an error!</h4> | ||
<p> | ||
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. | ||
</p> | ||
</Alert> | ||
</Col> | ||
<Col sm={4}> | ||
<Alert bsStyle="warning"> | ||
<h4>Oh snap! You got an error!</h4> | ||
<p> | ||
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. | ||
</p> | ||
</Alert> | ||
</Col> | ||
<Col sm={4}> | ||
<Alert bsStyle="danger"> | ||
<h4>Oh snap! You got an error!</h4> | ||
<p> | ||
Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. | ||
</p> | ||
</Alert> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col sm={4}> | ||
{Labels} | ||
</Col> | ||
<Col sm={6}> | ||
{navInstance} | ||
</Col> | ||
</Row> | ||
</Grid> | ||
</div>); | ||
} | ||
} | ||
|
||
export default Alerts; |
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,52 @@ | ||
import React, { Component } from 'react'; | ||
import { | ||
Navbar, | ||
NavItem, | ||
NavDropdown, | ||
MenuItem, | ||
Nav | ||
} from 'react-bootstrap'; | ||
|
||
class Navbars extends React.Component { | ||
|
||
render() { | ||
|
||
return ( | ||
<Navbar inverse collapseOnSelect> | ||
<Navbar.Header> | ||
<Navbar.Brand> | ||
<a href="#brand">React-Bootstrap</a> | ||
</Navbar.Brand> | ||
<Navbar.Toggle /> | ||
</Navbar.Header> | ||
<Navbar.Collapse> | ||
<Nav> | ||
<NavItem eventKey={1} href="#"> | ||
Link | ||
</NavItem> | ||
<NavItem eventKey={2} href="#"> | ||
Link | ||
</NavItem> | ||
<NavDropdown eventKey={3} title="Dropdown" id="basic-nav-dropdown"> | ||
<MenuItem eventKey={3.1}>Action</MenuItem> | ||
<MenuItem eventKey={3.2}>Another action</MenuItem> | ||
<MenuItem eventKey={3.3}>Something else here</MenuItem> | ||
<MenuItem divider /> | ||
<MenuItem eventKey={3.3}>Separated link</MenuItem> | ||
</NavDropdown> | ||
</Nav> | ||
<Nav pullRight> | ||
<NavItem eventKey={1} href="#"> | ||
Link Right | ||
</NavItem> | ||
<NavItem eventKey={2} href="#"> | ||
Link Right | ||
</NavItem> | ||
</Nav> | ||
</Navbar.Collapse> | ||
</Navbar> | ||
) | ||
} | ||
} | ||
|
||
export default Navbars; |
Oops, something went wrong.