@homebound/beam 2.175.1 → 2.175.2

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.
@@ -1,6 +1,9 @@
1
1
  import { ReactNode, ReactPortal } from "react";
2
- /** Helper component for placing scrollable content within a `ScrollableParent`. */
3
- export declare function ScrollableContent(props: {
2
+ interface ScrollableContentProps {
4
3
  children: ReactNode;
5
4
  virtualized?: boolean;
6
- }): ReactPortal | JSX.Element;
5
+ omitBottomPadding?: true;
6
+ }
7
+ /** Helper component for placing scrollable content within a `ScrollableParent`. */
8
+ export declare function ScrollableContent(props: ScrollableContentProps): ReactPortal | JSX.Element;
9
+ export {};
@@ -9,7 +9,7 @@ const ScrollableParent_1 = require("./ScrollableParent");
9
9
  const Css_1 = require("../../Css");
10
10
  /** Helper component for placing scrollable content within a `ScrollableParent`. */
11
11
  function ScrollableContent(props) {
12
- const { children, virtualized = false } = props;
12
+ const { children, virtualized = false, omitBottomPadding } = props;
13
13
  const { scrollableEl, setPortalTick, pl } = (0, ScrollableParent_1.useScrollableParent)();
14
14
  (0, react_1.useEffect)(() => {
15
15
  // The below `tick` logic is a way to detect whether the ScrollableContent is being used.
@@ -22,7 +22,7 @@ function ScrollableContent(props) {
22
22
  if (!scrollableEl) {
23
23
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }, void 0);
24
24
  }
25
- return (0, react_dom_1.createPortal)(!virtualized ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: ScrollableParent_1.scrollContainerBottomPadding }, { children: children }), void 0)) : (
25
+ return (0, react_dom_1.createPortal)(!virtualized ? (omitBottomPadding ? (children) : ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: ScrollableParent_1.scrollContainerBottomPadding }, { children: children }), void 0))) : (
26
26
  // To prevent Virtuoso's scrollbar from being set in based on the Layout's padding, we will use the FullBleed component w/o padding to push it back over
27
27
  (0, jsx_runtime_1.jsx)(FullBleed_1.FullBleed, Object.assign({ omitPadding: true }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.h100.pl(pl).$ }, { children: children }), void 0) }), void 0)), scrollableEl);
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.175.1",
3
+ "version": "2.175.2",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",