1.1.3 • Published 3 years ago

ya-basic-react-modal v1.1.3

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

ya-basic-react-modal

npm link

Installation

npm i ya-basic-react-modal
import { Modal } from 'ya-basic-react-modal';

Configuration

The most basic use of the Modal can be described with :

<Modal
	isOpened={isModalOpened}
	content='Example'
	handleCloseModal={handleCloseModal}
	buttonContent='Example'
/>
isOpened takes a boolean value
content takes a string
handleCloseModal takes a function
buttonContent takes a string

You can also add a style prop :

	const customStyle = {
        overlay: {
            backgroundColor: 'rgba(116, 87, 12, 0.75)'
        }
		content: {
			position: 'absolute',
			top: '50%',
			left: '50%',
			transform: 'translate(-50%, -50%)',
			backgroundColor: 'white',
			padding: '15px 30px',
			borderRadius: '10px',
		},
		closeButton: {
			border: 'none',
		},
	};

<Modal
	isOpened={isModalOpened}
	content='Example'
	handleCloseModal={handleCloseModal}
	buttonContent='Example'
	style={customStyle}
/>
1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago