New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

modal-generator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modal-generator

Pop Up Creator on Click.

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

ModalGenerator

Pop Up Creator on Click. Pass allowed selectors and whenever clicked on the specified selector a pop-up is generated at the cursor point. It can be used for showing tool tip on a click of some container, section.

Demo

  • CodeSandBox Demo
  • Stackblitz Demo

Modal Generator Demo gif

Installation

npm i modal-generator --save

Then, we can use as the following

import { ModalGenerator } from "modal-generator";

ModalGenerator({
      modalHeight: 400,
      modalWidth: 400,
      heading: "Types of actions",
      content: `Dialog content`,
      cssClass: ["myClass", "test-class-to-be-applied"],
      allowedSelectorsClick: [".typography-demo", ".only-open-modal-on-click-of-these-selector"],
      cssStr: `.myClass {
          background-color: #ececec;
      }`,
    });

Detailed usage of the modal-generator can be seen via the demo examples.

Options

OptionDescriptionDefault Value
modalHeightheight of the modal150
modalWidthwidth of the modal300
headingheading for the modal, if heading is specified a cross icon is generated for closing the modal''
contentcontent of the modal, can accept HTML provided as string''
cssClassarray of css class that will applied to the modal container[]
allowedSelectorsClickarray specifying only these selector to open modal when clicked inside.[]
cssStradditional css can also be passed as string that will be applied on the modal html structure''

Keywords

modal

FAQs

Package last updated on 12 Apr 2020

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