toggler

1.0.37 • Public • Published

Toggler

toggler-example

Quick start: SimpleMap

import React from 'react';
import { Component } from 'react';
import { Tabs, Pane } from 'toggler';

export default class App extends Component {
  render() {
    return (
      <div id='tabs-container'>
        <Tabs selected={0}>
          <Pane label='First'>
            <div>
              <p> Content for the first tab </p>
            </div>
          </Pane>
          <Pane label='Second'>
            <div>
              <p> Content for the second tab </p>
            </div>
          </Pane>
          <Pane label='Third'>
            <div>
              <p> Content for the third tab </p>
            </div>
          </Pane>
        </Tabs>
      </div>
    );
  }
}

Working example

The code is located under example folder.

First, clone the project.

git clone git@github.com:nicolas-amabile/toggler.git

Install node. Then,

cd toggler/example/
npm install
npm start

Then open http://localhost:8080/webpack-dev-server/.

Usage

npm install --save toggler

All components are available on the top-level export.

import { Tabs, Pane } from 'toggler';

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Package Sidebar

Install

npm i toggler

Weekly Downloads

2

Version

1.0.37

License

MIT

Last publish

Collaborators

  • nicolas-amabile