@slithy/modal-spring 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -579,11 +579,13 @@ var ModalRenderer = ({
579
579
  const renderBackdrop = () => transitions(
580
580
  (styles, show) => show ? /* @__PURE__ */ jsx6(ModalBackdrop2, { styles }) : null
581
581
  );
582
+ const isLayerActive = modalsExist || transitions.length > 0;
583
+ const activeRenderLayer = renderLayer ? (children) => isLayerActive ? renderLayer(children) : children : void 0;
582
584
  return /* @__PURE__ */ jsx6(
583
585
  ModalKitRenderer,
584
586
  {
585
587
  renderBackdrop,
586
- renderLayer,
588
+ renderLayer: activeRenderLayer,
587
589
  renderPortal
588
590
  }
589
591
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slithy/modal-spring",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "React Spring animation adapter for @slithy/modal-kit.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -17,8 +17,8 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@slithy/modal-core": "0.1.5",
20
- "@slithy/modal-kit": "0.1.6",
21
- "@slithy/utils": "0.4.1"
20
+ "@slithy/utils": "0.4.1",
21
+ "@slithy/modal-kit": "0.1.6"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@react-spring/web": ">=9 <10",