quicksnack 3.1.0 → 3.1.1

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.
@@ -2,7 +2,7 @@ import { BoxProps } from "../Box/Box";
2
2
  import React from "react";
3
3
  interface Props extends BoxProps {
4
4
  stretch?: boolean;
5
- items: JSX.Element[];
5
+ items: Array<JSX.Element | false>;
6
6
  }
7
7
  export declare const Floater: React.FC<Props>;
8
8
  export {};
@@ -34,6 +34,8 @@ var verticalMargin = { mobile: -1, laptop: 0 };
34
34
  var display = { mobile: "block", laptop: "flex" };
35
35
  var Floater = function (_a) {
36
36
  var items = _a.items, _b = _a.stretch, stretch = _b === void 0 ? false : _b, props = __rest(_a, ["items", "stretch"]);
37
- return react_1.default.createElement(Box_1.Box, __assign({ mb: verticalMargin, mt: verticalMargin, ml: horizontalMargin, mr: horizontalMargin, display: display }, props), items.map(function (item, i) { return react_1.default.createElement(FloaterItem_1.FloaterItem, { key: i, stretch: stretch }, item); }));
37
+ return react_1.default.createElement(Box_1.Box, __assign({ mb: verticalMargin, mt: verticalMargin, ml: horizontalMargin, mr: horizontalMargin, display: display }, props), items
38
+ .filter(Boolean)
39
+ .map(function (item, i) { return react_1.default.createElement(FloaterItem_1.FloaterItem, { key: i, stretch: stretch }, item); }));
38
40
  };
39
41
  exports.Floater = Floater;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quicksnack",
3
3
  "description": "Quickly create beautiful admin layouts using react",
4
- "version": "3.1.0",
4
+ "version": "3.1.1",
5
5
  "private": false,
6
6
  "files": [
7
7
  "dist/**"