forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into react-0.13
Conflicts: package.json src/NavItem.jsx src/Panel.jsx
- Loading branch information
Showing
28 changed files
with
842 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
- "0.10" |
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
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,23 @@ | ||
var navbarInstance = ( | ||
<Navbar brand="React-Bootstrap" toggleNavKey={0}> | ||
<CollapsableNav eventKey={0}> {/* This is the eventKey referenced */} | ||
<Nav navbar> | ||
<NavItem eventKey={1} href="#">Link</NavItem> | ||
<NavItem eventKey={2} href="#">Link</NavItem> | ||
<DropdownButton eventKey={3} title="Dropdown"> | ||
<MenuItem eventKey="1">Action</MenuItem> | ||
<MenuItem eventKey="2">Another action</MenuItem> | ||
<MenuItem eventKey="3">Something else here</MenuItem> | ||
<MenuItem divider /> | ||
<MenuItem eventKey="4">Separated link</MenuItem> | ||
</DropdownButton> | ||
</Nav> | ||
<Nav navbar right> | ||
<NavItem eventKey={1} href="#">Link Right</NavItem> | ||
<NavItem eventKey={2} href="#">Link Right</NavItem> | ||
</Nav> | ||
</CollapsableNav> | ||
</Navbar> | ||
); | ||
|
||
React.render(navbarInstance, mountNode); |
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,37 @@ | ||
var CollapsableParagraph = React.createClass({ | ||
mixins: [CollapsableMixin], | ||
|
||
getCollapsableDOMNode: function(){ | ||
return this.refs.panel.getDOMNode(); | ||
}, | ||
|
||
getCollapsableDimensionValue: function(){ | ||
return this.refs.panel.getDOMNode().scrollHeight; | ||
}, | ||
|
||
onHandleToggle: function(e){ | ||
e.preventDefault(); | ||
this.setState({expanded:!this.state.expanded}); | ||
}, | ||
|
||
render: function(){ | ||
var styles = this.getCollapsableClassSet(); | ||
var text = this.isExpanded() ? 'Hide' : 'Show'; | ||
return ( | ||
<div> | ||
<Button onClick={this.onHandleToggle}>{text} Content</Button> | ||
<div ref="panel" className={classSet(styles)}> | ||
{this.props.children} | ||
</div> | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
var panelInstance = ( | ||
<CollapsableParagraph> | ||
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. | ||
</CollapsableParagraph> | ||
); | ||
|
||
React.render(panelInstance, mountNode); |
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
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
Oops, something went wrong.