1.2.0 • Published 10 months ago

react-modal-aziza v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

react-modal-aziza

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save react-modal-aziza

Modal props

Nametypefeature
messagestring (optional)text to display on the modal
btnCloseBoolean (optional)display close button
btnStyleObject (optional)style close button and cross
modalStyleObject (optional)style the modal
isOpenModalbooleanstate of the modal
onClosefunctionfunction close Modal

Usage

btnStyle

  • btnBackgroundColor (string): background color of the cross and close button
  • btnTextColor (string): color of the text inside buttons

modalStyle

  • modalBackground (string): background color of the Modal
  • modalTextColor(string): color of the text inside modal

Exemple

import React, { useState } from 'react'

import Modal from 'react-modal-aziza'
import 'react-modal-aziza/dist/index.css'

const App = () => {
  const [modalDisplayed, setIsDisplayed] = useState(true)
  const toggleModal = () => setIsDisplayed(!modalDisplayed)
  return <Modal
    isOpenModal={modalDisplayed}
    onClose={toggleModal}
    message='Employee created !'
    btnClose
    btnStyle={{ btnBackgroundColor: 'yellow', btnTextColor: '#000' }}
    modalStyle={{ modalBackground: '#000', modalTextColor: '#fff' }}
  />
}

export default App

License

MIT © azizahamime

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago

0.7.0

10 months ago

0.6.0

11 months ago

0.5.0

11 months ago

0.4.0

11 months ago

0.3.0

11 months ago

0.2.0

11 months ago

0.1.0

11 months ago