npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

amandine_carreno_p14_modal_lib

v0.1.7

Published

## Cursus OpenClassrooms: Project 14

Downloads

3

Readme

Modal_Plugin

Cursus OpenClassrooms: Project 14

This plugin is a part of the project 14 HrNet. You will me able to create easily a customizable Modal component.

Installation

 npm i amandine_carreno_p14_modal_lib 

Usage

This is an example for a simple usage of the Modal component. To show the Modal you have do use the propertie "isOpen" and set it to true and to remove the Modal you have to pass a callback to set "isOpen" at false. You can Embeded the node element of your choice as modal's content.

// import Component
import { Modal } from "amandine_carreno_p14_modal_lib"
// import style
import "amandine_carreno_p14_modal_lib/dist/index.css"

function App() {
    // constent that handles the state of the modal
    const [open, setOpen] = useState(false)
 return (
        <> 
            <button onClick={() => setOpen(true)}>Open</button>
            
            <Modal isOpen={open} 
            handleClose={() => setOpen(false)}
            customButtonShow={false}>            
            <p>Your Message</p>
            </Modal>
        </>
    )
}

Properties

|Name | Type | Default. |Description | |----------|------- |----------|--------------------------------| |isOpen| bool| true | Display of the modal| |defaultButtonShow| bool| true | Display default button which only supports function to close the modal| |customButtonShow| bool| true | display customizable button| |handleClose| func| -- | Function that handles closing events on under layer, cross icon and default closing button| |handleCustomClick| func| -- | Function that handles event on custom button can be used as submit, cancel, etc..| |children|node| --| Modal main content| |title|string|-- | Modal Modal header text content| |defaultButtonLabel|string| "Close"| default button text label| |customButtonLabel|string| "OK"| custom button text label| |size|["L", "M", "S"]| --| Apply class to change dialog window's width| | underlayerColor | string | "rgba(83, 157, 131, 0.6)" | Modal uderlayer color| |underlayerWidth|string|"100%" | Width of under layer| |underlayerHeight|string|"100%" | Height of under layer| |dialogBackgroundColor|string|"#FFFF" | Modal dialog color| |iconColor|string| "rgba(83, 157, 131, 0.6)"| Modal cross icon color| |customButtonBackgroundColor|string| --| Customizable button background color| |customButtonColor|string| --| Customizable button text color| |customButtonMargin|string| --| Customizable button margin| |customButtonType|string| "button"| Customizable button type if "submit" propertie formId is needed | |formId|string| -- | Required to link form in modal content and customizable button|

Notes

this package use React and StoryBook. link to my project : https://github.com/carra1358/amandine_carreno_p14_02_05_2022

Author

Amandine Carreno