npm.io
0.4.8 • Published 4 years ago

react-tab-selector

Licence
Version
0.4.8
Deps
11
Size
7 kB
Vulns
0
Weekly
0

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