1.0.25 • Published 2 years ago

custom-message-react-modal v1.0.25

Weekly downloads
-
License
-
Repository
github
Last release
2 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

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago