1.0.4 • Published 6 years ago

react-popup-beta v1.0.4

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

React Popup Component

npm

  npm i react-popup-beta

git

  https://github.com/1987showsun/Popup-component-by-react-dev

Demo

Ex instructions:

  import Popup    from 'react-popup-beta';

  <Popup 
      className    = "test"                        // default null
      windowSet    = "top"                         // default center
      addTrigger   = {{
          text        : "trigger slider top",      // default null
          style       : {"width":"123px"},         // default null
          className   : "123"                      // default null
      }}
      effects      = "slider"                      // fade / slider / zoom, default=fade
      autoClose    = "5000"                        // default does not automatically close
      display      = "show"                        // default "hide" , If you want to open the showable exhibition
      returnDisplay= { "function" }                // return popup state 
  >   
      {/* show popup content */}
  </Popup>

Api

apimethoddescription
classNametypeof Sting Name yourselfName yourself,default null
windowSetwindowSet="center","top","bottom"show window set, default "center"
addTriggertypeof Objectobject key "text","style","className", if text = null not show trigger button;className is trigger button class
effectseffects = "fade" / "slider" / "zoom"popup window Animation , default=fade
autoCloseautoClose = "1000"will close timeout , default does not automatically close
displaydisplay = "show" / "hide"Can control the initial window display status , default="hide"
returnDisplayreturn typeof functionreturn popup state