react-ui-expand
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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 events
  • onOpen - subscribe to open events
  • beforeClose - subscribe to before close events
  • onClose - subscribe to close events
  • className - apply a className to the control
  • button - jsx element to trigger events
  • children - callback function to return jsx element which includes the button element

License

MIT Licensed. Copyright (c) appleple 2019.

Readme

Keywords

Package Sidebar

Install

npm i react-ui-expand

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

392 kB

Total Files

14

Last publish

Collaborators

  • appleple