0.4.8 • Published 2 years ago

react-tab-selector v0.4.8

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

React Tab Selector

Steps to publish a new version to the NPM registry

  1. Run npm run build.
  2. Verify files have changed with git status.
  3. Run npm publish.

Getting started

  1. Inside your project, run npm install --save react-tab-selector.

  2. Use the component:

import { TabSelector } from 'react-tab-selector';


const MyComponent = () => {
  return <div>
    <TabSelector
      tabs={[
        {
          title: 'All',
          onClick: () => alert('Clicked All')
        },
        {
          title: 'Gaming',
          onClick: () => alert('Clicked Gaming')
        },
        {
          title: 'Photography',
          onClick: () => alert('Clicked Photography')
        }
      ]}
    />
  </div>
}

Here's what this example would look like:

TabSelector example