1.0.25 • Published 3 years ago

custom-message-react-modal v1.0.25

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

custom-message-react-modal

Modal jsx element with customizable message

Table of Contents

Features

  • Allow customization of message that is displayed in modal
  • Allow style customization

If you want to override a component's styles using custom classes, you can use the className prop, available on each component. For example, target the .cmm-backdrop class name to customize the Backdrop element : You can customize the following elements :

  • backdrop by overriding ".cmm-backdrop" class
  • modal by overriding ".cmm-modal" class
  • content by overriding ".cmm-content" class
  • message by overriding ".cmm-message" class

Installation

To install, you can use npm :

$ npm install custom-message-react-modal    

Examples

Here is a simple example of custom-message-react-modal being used in an app with some custom input elements within the modal content:

import React from "react";
import { CustomMessageModal } from "custom-message-react-modal";

function App(props) {
	const [open, setOpen] = React.useState(false);
	const handleOpen = () => setOpen(true);
	const handleClose = () => setOpen(false);
	return (
		<div>
			<button onClick={handleOpen}>Hello</button>
			<CustomMessageModal
				isOpen={open}
				onRequestClose={handleClose}
				messageToDisplay={"Message to display"}
			></CustomMessageModal>
		</div>
	);
}
export default App;
1.0.22

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago