shared.mjs 867 B

12345678910111213141516171819202122232425262728293031323334
  1. import { truthProp, unknownProp, numericProp } from "../utils/index.mjs";
  2. const popupSharedProps = {
  3. // whether to show popup
  4. show: Boolean,
  5. // z-index
  6. zIndex: numericProp,
  7. // whether to show overlay
  8. overlay: truthProp,
  9. // transition duration
  10. duration: numericProp,
  11. // teleport
  12. teleport: [String, Object],
  13. // prevent body scroll
  14. lockScroll: truthProp,
  15. // whether to lazy render
  16. lazyRender: truthProp,
  17. // callback function before close
  18. beforeClose: Function,
  19. // overlay custom style
  20. overlayStyle: Object,
  21. // overlay custom class name
  22. overlayClass: unknownProp,
  23. // Initial rendering animation
  24. transitionAppear: Boolean,
  25. // whether to close popup when overlay is clicked
  26. closeOnClickOverlay: truthProp
  27. };
  28. const popupSharedPropKeys = Object.keys(
  29. popupSharedProps
  30. );
  31. export {
  32. popupSharedPropKeys,
  33. popupSharedProps
  34. };