Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevva/deku-popup
Popup/modal component for deku
https://github.com/kevva/deku-popup
Last synced: about 2 months ago
JSON representation
Popup/modal component for deku
- Host: GitHub
- URL: https://github.com/kevva/deku-popup
- Owner: kevva
- License: mit
- Created: 2015-11-18T13:59:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-04T07:48:48.000Z (over 7 years ago)
- Last Synced: 2024-10-12T01:06:39.970Z (3 months ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-deku - deku-popup - Popup/modal component for deku (Components)
README
# deku-popup [![Build Status](https://travis-ci.org/kevva/deku-popup.svg?branch=master)](https://travis-ci.org/kevva/deku-popup)
> Popup/modal component for [Deku](https://github.com/dekujs/deku)
## Install
```
$ npm install deku-popup
```## Usage
```js
import Popup from 'deku-popup';const openPopup = setState => {
setState({open: true});
};const render = ({state}, setState) => (
Open popup!
Hello world!
);export default {render};
```## API
### <Popup/>
#### onClickOutside
Type: `Function`
Function to call when clicking outside the popup.
#### open
Type: `boolean`
Default: `false`Whether to show the popup upon the initial render.
## License
MIT © [Kevin Mårtensson](https://github.com/kevva)