react-bar

0.16.3 • Public • Published

react-bar

Composable component maximizer / compressor for React.

Build Status codecov

NPM

Install

npm install -S react-bar

Usage

import React from 'react'
import reactBar from 'react-bar'
 
/** reactBar is a factory that exports the maximize component. */
const Maximize = reactBar({ React })
 
export default props => (
  <Maximize
      shouldComponentMaximize={() => true}
      shouldComponentCompress={() => true}
  >
    {maximize => (
      <div>
        <span style={{ float: 'right' }}>
          {maximize.Controls}
        </span>
      </div>
    )}
  </Maximize>
)

Test

See react-bar's test project at react-bar-test

In active development, come back in a few days.

Dependents (4)

Package Sidebar

Install

npm i react-bar

Weekly Downloads

7

Version

0.16.3

License

MIT

Last publish

Collaborators

  • cchamberlain