react-maximize

0.16.3 • Public • Published

react-maximize

Composable component maximizer / compressor for React.

Build Status codecov

NPM

Install

npm install -S react-maximize

Usage

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

Test

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

In active development, come back in a few days.

Package Sidebar

Install

npm i react-maximize

Weekly Downloads

1

Version

0.16.3

License

MIT

Last publish

Collaborators

  • cchamberlain