1.0.9 • Published 11 months ago

yunita_modal_package v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

This component displays a modal with a message in the center of the screen.

Install

via npm: npm i yunita_modal_package

Usage

The Modal component needs 2 props :

  • {text} : the text to display in the modal
  • {closeModal} : the function to close the modal. It actually should deactivate the visibility of the modal

Example:

import React from 'react';
import { useState } from "react"
import ModalWindow from 'yunita_modal_package'

export default function CreateForm() {
	const [modalVisibile, setModalVisibile] = useState(true);

	const closeModal = () => {
		setModalVisibile(false);
	}

  return (
    <div>
		{modalVisibile &&<ModalWindow text="Employee Created !" closeModal={closeModal}/>}
    </div>
   )
}
1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago