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 🙏

© 2024 – Pkg Stats / Ryan Hefner

plugin-modal-hrnet

v1.0.11

Published

Librairie pour l'application hrnet. Dans celle-ci vous retrouverez le modal

Downloads

8

Readme

Plugin Modal for HRnet

Library made for the HRnet application. In this library you will find the modal. You will find 2 types of modal, the classic modal and the "notification" modal.

NPM JavaScript Style Guide

Install

npm install --save hayden-react-rhnet-library

Usage

Example of the code for the Modal Classique

import React from 'react'
import { useState } from "react"
import Modal from 'hayden-react-rhnet-library'

const Example = () => {
  const [isOpen, setIsOpen] = useState(true)
  const corpsHtml = <div><h1>Hello World</h1><p>I love dev</p></div>
  return <Modal isOpen={isOpen} setIsOpen={setIsOpen} isNotification={false} corpsHtml={corpsHtml}/>
}

Example of the code for the Modal Notification

import React from 'react'
import { useState } from "react"
import Modal from 'hayden-react-rhnet-library'

const Example = () => {
  const [isOpen, setIsOpen] = useState(true)

  return <Modal isOpen={isOpen} setIsOpen={setIsOpen} text={"Hello world !"} isNotification={true} typeNotification="validate" autoClose={true}/>
}

Modal component props

For both type of modal

isOpen

Request a boolean. True: opens the modal. False: closes the modal.

setIsOpen= function pour mettre a jour isOpen

Sends the state function to update the "isOpen" variable.

autoClose

Request a boolean. This option closes the modal after 5 seconds. True: activates the timer. False: disables the timer.

For the classic modal

corpsHtml

Requests a variable containing html. This is displayed when you open a classic modal.

For the "notification" modal

text

Request a string. Injects the text you want into the component. Only works for notifications. If you want to put text in a classic modal use "corpsHtml"

isNotification

Request a boolean. The component is then displayed as a notification on the right side of the screen. True: The component is a notification. False: The component displays normally.

typeNotification: {"validate"} || {"alert"} || {"error"}

Request a string.

  • "validate" allows to have a positive notification.
  • "alert" makes a notification to warn the user.
  • "error" signals to the user that there is an error.

License

MIT © HaydenLeDev