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

grbn-react-modal

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grbn-react-modal

This package use react and vite

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
200%
Maintainers
0
Weekly downloads
 
Created
Source

React Modal Component

This package use react and vite

Installation

npm i grbn-react-modal

Usage

import {Modal} from '../lib/main'
import { useState } from 'react'

function App() {
  const [active, setActive] = useState(false)

  const handleSubmit = () => {
    setActive(true)
  }

  const close = () => {
    setActive(false)
  }

  return (
    <>
        <button type="submit" onClick={handleSubmit}>Save</button>
        {active &&
          <Modal onClose={close} modalText="Employee created!"/>
        }
    </>
  )
}

export default App

Custom

To style your modal you just have to going in your css file and use css class

For the container

.react-modal-container {
  ...;
}

For the modal

.react-modal-modal {
  ...;
}

For the text

.react-modal-text {
  ...;
}

For the cross

.react-modal-cross {
  ...;
}

.react-modal-cross::before,
.react-modal-cross::after {
  ...;
}

FAQs

Package last updated on 12 Sep 2024

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