lc_modal_custom_projet14

0.2.2 • Public • Published

Plugin Modal

modal success - generic component

Tech

Example Modal

const  Modal = ({ show, title, children, footer, onClose}) => {
const  modal = (
	<div  className="modal"  data-testid="modal">
		<div  className="modal-container">
			<h3  className="modal-title">{title}</h3>
			<p  className="modal-body">{children}</p>
			<button className="close-button modal-footer"node  data-testid="close-button" onClick={() => {onClose();}}>
				{footer}
			</button>
		</div>
	</div>
	);
	return  show ? ReactDOM.createPortal(modal,document.body) : null;
};

Installation Plugin Modal

  • git clone
  • npm install
  • npm run storybook

Notes

Author

Laurène COURDE

Readme

Keywords

Package Sidebar

Install

npm i lc_modal_custom_projet14

Weekly Downloads

1

Version

0.2.2

License

none

Unpacked Size

2.75 MB

Total Files

27

Last publish

Collaborators

  • lowlow45