Socket
Book a DemoInstallSign in
Socket

deku-popup

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku-popup

Popup/modal component for deku

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

deku-popup

Popup/modal component for deku

Install

$ npm install deku-popup

Usage

import Popup from 'deku-popup';

const openPopup = setState => {
	setState({open: true});
};

const render = ({state}, setState) => (
	<div>
		<Button onClick={openPopup(setState)}>Open popup!</Button>
		<Popup open={state.open}>
			<h1>Hello world!</h1>
		</Popup>
	</div>
);

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

Keywords

component

FAQs

Package last updated on 29 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts