react-maximize
v0.16.3
Published
React control to maximize / compress components.
Downloads
21
Maintainers
Readme
react-maximize
Composable component maximizer / compressor for React.
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.