react-ui-expand
v1.0.1
Published
Just a simple UI helper to expand elements
Downloads
1
Readme
react-ui-expand
Install
$ npm install react-ui-expand --save
Usage
import * as React from 'react';
import { render } from 'react-dom';
import Expand from 'react-ui-expand';
const Demo = () => {
return (<Expand
className="hoge"
button={<button>Open!!</button>}
>
{(button) => {
return(<div>{button}
This Element will expand to fullscreen!!
</div>);
}}
</Expand>)
};
render(<Demo/>, document.getElementById('demo'));
Props
Common props you may want to specify include:
beforeOpen
- subscribe to before open eventsonOpen
- subscribe to open eventsbeforeClose
- subscribe to before close eventsonClose
- subscribe to close eventsclassName
- apply a className to the controlbutton
- jsx element to trigger eventschildren
- callback function to return jsx element which includes the button element
License
MIT Licensed. Copyright (c) appleple 2019.