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

my-modal-souleymane7800

v1.9.0

Published

"Modal React pour l'application HRnet de WealthHealth : Un composant React réutilisable pour implémenter des boîtes de dialogue modales dans l'application HRnet. Ce composant a été converti à partir d'un plugin jQuery existant et est conçu pour améliorer

Downloads

173

Readme

my-modal-souleymane7800

"Modal React pour l'application HRnet de WealthHealth : Un composant React réutilisable pour implémenter des boîtes de dialogue modales dans l'application HRnet. Ce composant a été converti à partir d'un plugin jQuery existant et est conçu pour améliorer la convivialité et l'expérience utilisateur de l'application. Il suit les meilleures pratiques de la programmation fonctionnelle et est testé pour garantir la stabilité et les performances. Documenté avec soin pour faciliter l'intégration et la maintenance futures."

npm version React Vite TypeScript Styled-Components

Example

Installation

You can install the package using npm:

npm install --save my-modal-souleymane7800

Modal component

Description

my-modal-souleymane7800 is a flexible and customizable React modal component built with TypeScript and Vite...

Props

| Prop | Type | Required | Description | | ------------ | ------------------- | -------- | ------------------------------------------------ | | isOpen | boolean | Yes | Controls whether the modal is open or closed | | onClose | () => void | Yes | Function to call when the modal should be closed | | message | string | Yes | The main message to display in the modal | | label | string | Yes | The title or label for the modal | | confirm | string | Yes | Text for the confirmation button | | close | string | Yes | Text for the close button | | overlayStyle | React.CSSProperties | No | Custom styles for the modal overlay | | contentStyle | React.CSSProperties | No | Custom styles for the modal content container | | headerStyle | React.CSSProperties | No | Custom styles for the modal header | | bodyStyle | React.CSSProperties | No | Custom styles for the modal body | | closeStyle | React.CSSProperties | No | Custom styles for the close button | | children | React.ReactNode | No | Additional content to render inside the modal |

Examples

 <Modal
    isOpen={isModalOpen}
    onClose={closeModal}
    label='My Modal'
    message='This is the modal content'
    confirm='Confirm'
    close='Close'
    overlayStyle={{ 'your style' }}
    contentStyle={{ 'your style' }}
    bodyStyle={{ 'your style' }}
  />

Usage

  import React, { useState } from 'react';
  import { Modal } from 'my-modal-souleymane7800';
  import styled from 'styled-components';

  function Example() {
    const [isModalOpen, setIsModalOpen] = useState(false);

    return (
      <div>
        <button onClick={() => setIsModalOpen(true)}>
          Open Modal
        </button>
        <Modal
          isOpen={isModalOpen}
          onClose={() => setIsModalOpen(false)}
          label='My Modal'
          message='This is the modal content'
          confirm='Confirm'
          close='Close'
          overlayStyle={{ 'your style' }}
          contentStyle={{ 'your style' }}
          bodyStyle={{ 'your style' }}
        />
        <button onClick={onClose}>{confirm}</button>
        <button style={closeStyle} onClick={onClose}>
          {close}
        </button>
      </div>
    );
  }

export default Example;

Peer Dependencies

The my-modal-souleymane7800 component has the following peer dependencies:

  "peerDependencies": {
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "styled-components": "^6.1.12"
  }

License

MIT © souleymane7800