Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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)