0.0.11 • Published 10 years ago

react-tabbar v0.0.11

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

Information

Usage

  • defaultTab
    • optional
    • string
    • must be a key from props.tabs
  • tabs
    • required
    • object where the key is a unique tab name, and the value is a tab descriptor
    • tab descriptor attributes
      • label
        • optional, will add a label element if provided
        • can be a string with text or a renderable node
      • icon
        • optional, will add an icon element if provided
        • can be a string with the class name or a renderable node
      • view
        • required
        • must be a renderable
var App = React.createClass({
  displayName: 'demo',
  render: function(){
    return TabBar({
      defaultTab: 'favorites',
      tabs: {
        friends: {
          label: 'Friends',
          icon: 'fa-friends',
          view: FriendsView
        },
        favorites: {
          label: 'Favorites',
          icon: 'fa-favorite',
          view: FavoritesView
        }
      },
      onTabChange: function(tabName, tab){
        console.log('tab changed', tabName, tab);
      }
    });
  }
});
0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago