mdm-simple-modal
v2.0.24
Published
just another simple modal component
Downloads
10
Readme
mdm-simple-modal
react component of a modal to display text
Install
npm install --save mdm-simple-modal
Usage
import React, { Component } from 'react'
import {SimpleModal, openModal} from 'mdm-simple-modal'
import 'mdm-simple-modal/dist/index.css'
class Example extends Component {
render() {
return <SimpleModal text='Hello World !' />
}
}
Options
Add options
import React, { Component } from 'react'
import {SimpleModal, openModal} from 'mdm-simple-modal'
import 'mdm-simple-modal/dist/index.css'
class Example extends Component {
render() {
return <SimpleModal text='Hello World !' image='./dog.jpg' options={{bgColor:'red',width:'100%',height:'70%', imgUrl:dsn}}/>
}
}
Available options
|option |type |default| |--- |--- |--- | |bgColor |String |White | |height |String |50px | |width |String |500px | |maskBgColor |String |gray | |maskBgOpacity |String |1 | |height |String |70% | |imgUrl |String | | |zindex |String | 10 |
License
MIT © melaniemdm