react-minimize
v0.16.3
Published
React control to maximize / compress components.
Downloads
33
Maintainers
Readme
react-minimize
Composable component minimizer / restorer for React.
Install
npm install -S react-minimize
Usage
import React from 'react'
import reactMinimize from 'react-minimize'
/** reactMinimize is a factory that exports the maximize component. */
const Maximize = reactMinimize({ React })
export default props => (
<Maximize
shouldMaximize={() => true}
shouldCompress={() => true}
>
{maximize => (
<div>
<span style={{ float: 'right' }}>
{maximize.Controls}
</span>
</div>
)}
</Maximize>
)
Test
See react-minimize's test project at react-minimize-test
In active development, come back in a few days.