0.1.11 • Published 2 years ago

modal-library-ludogwada v0.1.11

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

Modal-library-ludogwada

A library of React components.

Installation

Install modal-library with npm

  npm install modal-library-ludogwada

Badges

made-with-create-react-app

Prerequisites

Usage/Examples

import React, { useState } from 'react';
import Modal from '../lib/component/ModalLibrary';
import './index.css';

const ModalExample = () => {
	const [showModal, setShowModal] = useState(false);

	const show = () => {
		setShowModal(true);
	};

	return (
		<main>
			<h1>Test ModalLibrary</h1>
			<button onClick={show}>Click</button>
			{showModal ? (
				<Modal
					modalStyle='modal'
					textStyle='text'
					showModal={showModal}
					setShowModal={setShowModal}
					content='hello World'></Modal>
			) : null}
		</main>
	);
};
export default ModalExample;
css
.modal {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 50% auto;
	padding: 20px;
	width: 80%;
	border: 1px solid black;
	border-radius: 10px;
	background-color: gray;
}

.text {
	font-size: x-large;
	font-weight: 700;
	color: black;
}

Props

LabelTypeRequiredDefault
modalStylestringYesN/A
textStylestringNoN/A
showModalbooleanYes'false'
setShowModalfunctionYesN/A
contentstringyesN/A

Authors

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago