1.0.1 • Published 2 years ago

simple-react-modal-max v1.0.1

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

SimpleReactModalMax

Installation

With npm: npm install simple-react-modal-max --save

Or with yarn: yarn add simple-react-modal-max

Documentation

PropsOptionsDefaultExplanation
isOpen(boolean) true/falsefalsedisplay modal
onClose(string) "rightTop", "rightBottom", "leftTop", "leftBottom""rightTop"position to close button
responsive(boolean) true/falsefalsemode responsive
openAnim(boolean) true/falsetrueanimation to start modal
closeAnim(boolean) true/falsetrueanimation 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