1.0.1 • Published 8 years ago

react-tab-group v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

react-tabbar

Usage

  import React from 'react';
  import ReactDOM from 'react-dom';
  import ReactTabGroup from './react-tabbar.jsx';

  const sections = [
    {
      url: 'mocks/section-1.json',
      params: {
        norce: 'hello'
      }
    },
    {
      url: 'mocks/section-2.json',
      params: {
        norce: 'world'
      }
    },
    {
      url: 'mocks/section-3.json',
      params: {
        norce: 'abcde'
      }
    }
  ];

  ReactDOM.render(<ReactTabGroup sections={sections} onSwitch={(index) => console.log(index)} />, document.getElementById('react-tabbar'));

API

default
type: Number
default: 0

buttons
type: Array
default: ['button-1', 'button-2', 'button-3']

sections
type: Array
default: ['section-1', 'section-2', 'section-3']

onSwitch
type: Function
default: null

LICENSE

MIT