@obosbbl/grunnmuren-react 2.0.0-canary.38 → 2.0.0-canary.39

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.mjs +3 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -938,7 +938,6 @@ const Alertbox = ({ children, role, className, variant = 'info', isDismissable =
938
938
  return;
939
939
  }
940
940
  const [firstChild, ...restChildren] = Children.toArray(children);
941
- const lastChild = restChildren.pop();
942
941
  return /*#__PURE__*/ jsxs("div", {
943
942
  className: alertVariants({
944
943
  className,
@@ -969,12 +968,11 @@ const Alertbox = ({ children, role, className, variant = 'info', isDismissable =
969
968
  })
970
969
  ]
971
970
  }),
972
- !isCollapsed && restChildren.length > 0 && /*#__PURE__*/ jsx("div", {
973
- className: "col-span-full grid gap-y-4",
971
+ restChildren?.length > 0 && /*#__PURE__*/ jsx("div", {
972
+ className: cx('col-span-full grid gap-y-4', isCollapsed && '[&>*:not([data-slot="footer"])]:hidden'),
974
973
  id: id,
975
974
  children: restChildren
976
- }),
977
- lastChild
975
+ })
978
976
  ]
979
977
  });
980
978
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-react",
3
- "version": "2.0.0-canary.38",
3
+ "version": "2.0.0-canary.39",
4
4
  "description": "Grunnmuren components in React",
5
5
  "repository": {
6
6
  "url": "https://github.com/code-obos/grunnmuren"