JSPM

react-simple-toolbar

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 159
  • Score
    100M100P100Q78242F
  • License MIT

A carefully crafted simple toolbar for React

Package Exports

  • react-simple-toolbar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-simple-toolbar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-simple-toolbar

A carefully crafted toolbar for React

No support for overflowing items

Install

$ npm install react-simple-toolbar --save

Usage

var Toolbar = require('react-simple-toolbar')
var Region  = Toolbar.Region

<Toolbar>
    <Region>
        Export
    </Region>

    <Region flex={2}>
        <Toolbar>
            <Region align="center">Import from CSV</Region>
            <Region align="center">Import from Excel</Region>
        </Toolbar>
    </Region>

    <Region>
        Save
    </Region>
</Toolbar>

//second example
<Toolbar>
    <Region align="left">
        Export
    </Region>

    <Region align="right">
        Save
    </Region>
</Toolbar>

Props (for Toolbar.Region)

  • align: String - either 'left', 'right' or 'center'

If you don't specify an align, here is how it will behave:

  • if you only have 1 region in the toolbar, it will align 'left'
  • if you have 2 regions in the toolbar, the first will align 'left', the second will align 'right'
  • if you have 3 regions, they will align 'left', 'center' and 'right'

If you have no region in the toolbar, one will be created by default and will contain all toolbar children.

  • flex: Number/String

Changelog

See changelog

Contributing

Use Github issues for feature requests and bug reports.

We actively welcome pull requests.

For setting up the project locally, use:

$ git clone https://github.com/zippyui/react-simple-toolbar
$ cd react-simple-toolbar
$ npm install
$ npm serve # to start http server
$ npm dev   * to start webpack-dev-server

Now navigate to localhost:9091

Before building a new version, make sure you run

$ npm run build

which compiles the src folder (which contains jsx files) into the lib folder (only valid EcmaScript 5 files).

License

MIT