Skip to content

add NavbarToggler example#216

Merged
eddywashere merged 8 commits intoreactstrap:masterfrom
edgji:NavbarToggler-example
Nov 2, 2016
Merged

add NavbarToggler example#216
eddywashere merged 8 commits intoreactstrap:masterfrom
edgji:NavbarToggler-example

Conversation

@edgji
Copy link
Copy Markdown
Contributor

@edgji edgji commented Nov 1, 2016

adding a collapsible Navbar component example with NavbarToggler per #129

edgji and others added 2 commits October 31, 2016 22:51
* init collapse

* add collapse animation

* add margin between toggle button and collapse

* disable lint on force refresh DOM line.

* add test to Collapse

* remove height after shown

* Revert "remove height after shown"

This reverts commit eff9353.

* remove height after shown.

* add more test

* use setState() to set inline height style

* remove custom tag in doc

* add inline style test

* remove comment

* set height to null when isOpen is true

* add initial state test
Comment thread docs/lib/examples/NavbarToggler.js Outdated
<Navbar color="faded" light>
<NavbarBrand href="/">reactstrap</NavbarBrand>
<NavbarToggler className="float-sm-right hidden-lg-up collapsed" onClick={this.toggleNavbar} />
<div className={classnames('collapse', 'navbar-toggleable-md', {in: !this.state.collapsed})}>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rebase this pr and use the new Collapse component?

<div className={classnames('collapse', 'navbar-toggleable-md', {in: !this.state.collapsed})}>
<Nav className="float-sm-left float-md-right" navbar>
<Collapse className="navbar-toggleable-md" isOpen={!this.state.collapsed}>
<NavbarBrand href="/">reactstrap</NavbarBrand>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's too bad BS4 doesn't support this being outside of the collapsible section. I imagine the toggle icon on one side and the brand on the other side. 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would support it with additional styling but I implemented it exactly like the sample on BS4's own docs for simplicity.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure. I'm holding off on documenting custom styles but I might do something like this for the docs site navbar. Thanks again for documenting this!

@eddywashere eddywashere merged commit 997d36f into reactstrap:master Nov 2, 2016
@edgji edgji deleted the NavbarToggler-example branch November 2, 2016 18:25
@eddywashere eddywashere mentioned this pull request Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants