react-tab-group

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i react-tab-group

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • artisan