@artsy/palette-mobile 13.2.37 → 13.2.38

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,7 +1,8 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  export interface StickySubHeaderProps extends React.PropsWithChildren<{}> {
3
3
  title: string;
4
4
  separatorComponent?: React.ReactNode;
5
5
  subTitle?: string;
6
+ Component?: React.ReactNode;
6
7
  }
7
8
  export declare const StickySubHeader: React.FC<StickySubHeaderProps>;
@@ -9,7 +9,7 @@ import { Separator } from "../Separator";
9
9
  import { Text } from "../Text";
10
10
  const STICKY_BAR_HEIGHT = 42;
11
11
  const DEFAULT_SEPARATOR_COMPONENT = _jsx(Separator, { borderColor: "black5" });
12
- export const StickySubHeader = ({ title, separatorComponent = DEFAULT_SEPARATOR_COMPONENT, subTitle, children, }) => {
12
+ export const StickySubHeader = ({ title, separatorComponent = DEFAULT_SEPARATOR_COMPONENT, subTitle, children, Component, }) => {
13
13
  const { currentScrollY, scrollYOffset = 0 } = useScreenScrollContext();
14
14
  const space = useSpace();
15
15
  const [stickyBarHeight, setStickyHeaderHeight] = useState(null);
@@ -40,5 +40,5 @@ export const StickySubHeader = ({ title, separatorComponent = DEFAULT_SEPARATOR_
40
40
  ],
41
41
  };
42
42
  });
43
- return (_jsxs(Flex, { children: [stickyBarHeight === null && (_jsx(Flex, { onLayout: (event) => handleLayout(event), position: "absolute", backgroundColor: "white100", zIndex: -1000, style: sharedStyles, children: _jsxs(Flex, { mb: 1, children: [_jsx(Text, { variant: "lg-display", color: "white100", children: title }), !!subTitle && (_jsx(Text, { variant: "xs", mt: 0.5, color: "white100", children: subTitle }))] }) })), _jsx(Animated.View, { style: [sharedStyles, animatedStyles], children: _jsxs(Flex, { style: { height: stickyBarHeight }, mb: 1, children: [_jsx(Text, { variant: "lg-display", children: title }), subTitle && (_jsx(Text, { variant: "xs", mt: 0.5, children: subTitle }))] }) }), children, children !== undefined && separatorComponent] }));
43
+ return (_jsxs(Flex, { children: [stickyBarHeight === null && (_jsx(Flex, { onLayout: (event) => handleLayout(event), position: "absolute", backgroundColor: "white100", zIndex: -1000, style: sharedStyles, children: _jsxs(Flex, { mb: 1, children: [_jsx(Text, { variant: "lg-display", color: "white100", children: title }), !!subTitle && (_jsx(Text, { variant: "xs", mt: 0.5, color: "white100", children: subTitle })), Component] }) })), _jsxs(Animated.View, { style: [sharedStyles, animatedStyles], children: [_jsxs(Flex, { style: { height: stickyBarHeight }, mb: 1, children: [_jsx(Text, { variant: "lg-display", children: title }), subTitle && (_jsx(Text, { variant: "xs", mt: 0.5, children: subTitle }))] }), Component] }), children, children !== undefined && separatorComponent] }));
44
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.2.37",
3
+ "version": "13.2.38",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "RCT_METRO_PORT=8082 react-native run-android --port 8082 --terminal terminal",