1.0.1 • Published 2 years ago
simple-react-modal-max v1.0.1
SimpleReactModalMax
Installation
With npm: npm install simple-react-modal-max --save
Or with yarn: yarn add simple-react-modal-max
Documentation
Props | Options | Default | Explanation |
---|---|---|---|
isOpen | (boolean) true/false | false | display modal |
onClose | (string) "rightTop", "rightBottom", "leftTop", "leftBottom" | "rightTop" | position to close button |
responsive | (boolean) true/false | false | mode responsive |
openAnim | (boolean) true/false | true | animation to start modal |
closeAnim | (boolean) true/false | true | animation to close modal |
txtColor | (string) "black", "green", "red", "yellow", "orange", "violet" | "black" | change color to content string |
pageOpacity | (string) "none", soft", "standard", "very", "full" | "none" | option to opacity background |
Exemple
import { SimpleReactModalMax } from "simple-react-modal-max";
export default class App extends React.Component {
constructor() {
super();
this.state = {};
}
show() {
this.setState({ show: true });
}
close() {
this.setState({ show: false });
}
render() {
return (
<div>
<a onClick={this.show.bind(this)}>Open Modal</a>
<SimpleReactModalMax
isOpen={true}
onClose="rightTop"
responsive={true}
pageOpacity="soft"
openAnim={true}
closeAnim={true}
txtColor="green"
>
<p>Employee Created!</p>
</SimpleReactModalMax>
</div>
);
}
}
License
MIT © future64