Skip to content

Tabs not showing on react-toolbox-example #56

@AleCaste

Description

@AleCaste

Hello. I installed the react-toolbox-example project and was able to use all the components without any problems. All of them except for the "Tabs" component.
This component simply doesn't show.
See this trivial App.js:

import React from 'react';
import { Button } from 'react-toolbox/lib/button';
//import { Tab, Tabs } from 'react-toolbox';
import { Tabs, Tab } from "react-toolbox/lib/tabs";

class App extends React.Component {
  state = {
    index: 0
  };
  setIndex = index => {
    this.setState({ index });
  };
  render() {
    return (
      <div>
        <div>[Tabs - start]</div>
        <Tabs index={this.state.index} onChange={this.setIndex}>
          <Tab label='Primary'><small>Primary content</small></Tab>
          <Tab label='Secondary' onActive={this.handleActive}><small>Secondary content</small></Tab>
          <Tab label='Third' disabled><small>Disabled content</small></Tab>
          <Tab label='Fourth' hidden><small>Fourth content hidden</small></Tab>
          <Tab label='Fifth'><small>Fifth content</small></Tab>
        </Tabs>
        <div>[Tabs - end]</div>
        <Button label='Click on me!' raised primary />
      </div>
    );
  }
}

export default App;

All I get on the screen is something like:

[Tabs - start]
[Tabs - end]

   Click on me!

The Tabs and Tab objects are imported alright I think (at least they are not null). I tried to import them in 2 different ways (see code above) but the result is the same on both cases.
I want to point out the fact that any other component I tried it worked without any issues (and I tried almost all of them!)
Any ideas?
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions