Skip to content

Future64/SimpleReactModalMax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Modal react Plugin to P14 développeur Front-End OpenClassRooms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published