An open API service indexing awesome lists of open source software.

https://github.com/appleple/react-ui-expand

Just a simple UI helper to expand elements
https://github.com/appleple/react-ui-expand

Last synced: 4 months ago
JSON representation

Just a simple UI helper to expand elements

Awesome Lists containing this project

README

          

# react-ui-expand

![](./assets/example.gif)

## Install

```
$ npm install react-ui-expand --save
```

## Usage

```js
import * as React from 'react';
import { render } from 'react-dom';

import Expand from 'react-ui-expand';

const Demo = () => {
return (Open!!}
>
{(button) => {
return(

{button}
This Element will expand to fullscreen!!
);
}}
)
};

render(, 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.