Socket
Socket
Sign inDemoInstall

reactjs-popup

Package Overview
Dependencies
6
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    reactjs-popup

React Popup Component


Version published
Maintainers
1
Created

Readme

Source

Reactjs-popup

Build Status BCH compliance License: MIT

NPM

built with react Fragment : react 16 Tiny 3KB

A Simple React popup. You can use it as a tooltip, modal,subMenu and more ...

React Popup Component

Demo

Live Demo

Installing / Getting started

npm install reactjs-popup --save
or
yarn add reactjs-popup -S

Include the Component

<Popup
  triggerOn="click"
  position="top,left"
  closeOnDocumentClick={true}
  trigger={<button>Button nested</button>}
>
  <div>popup content Here</div>
</Popup>

You can also use it with function as children pattern

<Popup
  triggerOn="click"
  position="top,left"
  closeOnDocumentClick={true}
  trigger={<button>Button nested</button>}
>
  {(open, close) => (
    <div>
      content here
      <a className="close" onClick={close}>
        &times;
      </a>
    </div>
  )}
</Popup>

You can find more examples in the reactjs-popup home page

Contributing

Clone Repo

Fork and then clone the repo

git clone git@github.com:your-username/reactjs-popup.git

Start Developing

Install all npm scripts:

npm install
or
yarn install

we use storybook in this project.before starting, be sure to have some basic knowledge https://storybook.js.org/

Run storybook :

npm run storybook

Run Test in watch mode

npm run storybook

To make contributing simply you need to create a new story with documentation under src/stories directory ( you can copy/past any story to start with ).

In this story, you need to present the new features or the bug fix and don't forget to document your story by using storybook info addon.

Make Changes. If you want to contribute check out the help wanted issues for things that need fixing.

Before submitting a pull request run npm run test to run the unit-tests and npm run eslint to check for linting errors in your changes.

Licensing

The code in this project is licensed under MIT license.

Keywords

FAQs

Last updated on 01 Jan 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc