1.0.6 • Published 1 year ago

cadegancode-reactmodal v1.0.6

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

HTML5 CSS3 Javascript SASS React

A React modal component

1. Technologies

  • Javascript
  • SASS
  • React

2. Author

3. Project

3.1 Prerequisites

Please make sure you have the right versions and download both packages. You can verify this by using the following commands in your terminal:

# Check Node.js version
node --version

# Check Yarn version
yarn --version

# Check NPM version
npm --version

3.2 Installing

NPM

npm i cadegancode-react-modal

or

YARN

yarn add cadegancode-react-modal

4. Repository

The repository is available at https://github.com/Cadegan/cadegancode-react-modal.git

5. How to use?

Import the modal into your React application:

import { Modal } from "cadegancode-react-modal";
import { useState } from "react";

Then, add the following code :

const [showModal, setShowModal] = useState(false);
//
//
<Modal openModal={showModal} closeModal={() => setShowModal(false)}>
    {"Edit your message here"}
</Modal>

6. Style overrides

The modal component comes with a default theme. Override it with a css if you want to apply a custom design.