question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are there any real life non-story book examples?

See original GitHub issue

I can’t seem to get any Navbar example to work with with the burger menu. Is there any kind of clear real life example that’s not wrapped in story book? Even the story book doesn’t have a working burger menu.

class Nav extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
       open: false
     }
  }

  onClick = () => {
    this.setState({
      open: !this.state.open
    });
  }

  render() {
    return (
      <Navbar>
        <Navbar.Brand>
          <Navbar.Item renderAs="a" href="#">
            <img
              src="https://bulma.io/images/bulma-logo.png"
              alt="Bulma: a modern CSS framework based on Flexbox"
              width="112"
              height="28"
            />
          </Navbar.Item>
          <Navbar.Burger active={this.state.open} onClick={this.onClick} />
        </Navbar.Brand>
        <Navbar.Menu active="open">
          <Navbar.Container>
            <Navbar.Item href="#">Second</Navbar.Item>
          </Navbar.Container>
          <Navbar.Container position="end">
            <Navbar.Item href="#">At the end</Navbar.Item>
          </Navbar.Container>
        </Navbar.Menu>
      </Navbar>
    )
  }
}

export default Nav

With the above code I get

node_modules/react-error-overlay/lib/index.js:2172 Warning: Received `false` for a non-boolean attribute `active`.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
coudscommented, Nov 27, 2018

That’s an error. In V1 the menú accepted the prop but in v2 it use React.Context.

We should remove the prop on storybook for the menu

1reaction
coudscommented, Nov 27, 2018

Hi @bluengreen.

On the storybook you should use the knob tab to open/close the navbar.

On the example code above you should pass the open state to the Navbar instead of the Burguer.

I hope this solve your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

25 Novels Based on True Stories - Books - Oprah Daily
Classics like "Jaws" is a famous example of novels based on true stories that eventually became tantalizing narratives.
Read more >
21 Incredible Books Based on True Stories | Book Riot
1. The Good People by Hannah Kent. True story: In mid–19th century Ireland a woman called Anne Roche was tried for the murder...
Read more >
50 essential non-fiction books - AbeBooks
I Know Why the Caged Bird Sings In Cold Blood Bury My Heart at Wounded Knee Hiroshima H is For Hawk The Man...
Read more >
Nonfiction Novel Overview & Examples | What is a ... - Study.com
Narrative nonfiction tells a chronological story, complete with real characters, setting and plot. It draws on the writer's own life experiences ...
Read more >
The best non-fiction books of all time - Pan Macmillan
The best non-fiction books can educate readers on vital subjects, offer fresh new perspectives, or simply give us a valuable, and often ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found