1.3.3 • Published 2 years ago

reactlightmodalfz v1.3.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

React Light Modal

ReactLightModal is a modal library, built in typescript light and accessible. It's goal is to provide easy, flexible, configurable and accessible way to display modals for your application.

Installation

Install ReactLightModal with npm

npm i reactlightmodalfz

Install ReactLightModal with yarn

yarn add reactlightmodalfz

Usage/Examples

import Modal from 'reactlightmodalfz';
import React, {useState} from "react;

const [modal, setModal] = useState(false);

const toggleModal = () => {
    setModal(!modal)
}

function App() {
  return (
      <Modal />
  )
}

Props

NameTypeRequiredDescriptionDefault value
canClosebooleanfalseDisplay cross button on the top-right of the modal boxtrue
closeBtnContentJSX.elementfalseCustom content add on the close button (exemple: personalized icon, ...){<span>X</span}
footerContentJSX.elementfalseCustom content to add to the footer (exemple: action buttons, ...){}
haveFooterbooleanfalseIf his value is true, the modal have footer elementfalse
isOpenbooleantrueIf his value is true, the modal is displayedfalse
modalContentJSX.elementtrueContent of the modal{}
titlestringfalseModal header title""

Running Tests

To run tests, run the following command

  npm run test

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago