@artsy/palette-mobile 22.1.0--canary.425.5080.0 → 22.1.0--canary.425.5083.0

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.
@@ -13,6 +13,7 @@ export interface HeaderProps {
13
13
  title?: string | JSX.Element;
14
14
  titleProps?: FlexProps;
15
15
  titleShown?: boolean;
16
+ zIndex?: number;
16
17
  }
17
18
  export declare const AnimatedHeader: React.FC<HeaderProps>;
18
19
  export declare const Header: React.FC<HeaderProps>;
@@ -11,13 +11,13 @@ import { Touchable } from "../Touchable";
11
11
  export const AnimatedHeader = (props) => {
12
12
  return _jsx(Header, { animated: true, ...props });
13
13
  };
14
- export const Header = ({ animated = false, hideLeftElements, hideRightElements, hideTitle, leftElements, onBack, rightElements, title, titleProps = {}, }) => {
14
+ export const Header = ({ animated = false, hideLeftElements, hideRightElements, hideTitle, leftElements, onBack, rightElements, title, titleProps = {}, zIndex = ZINDEX.header, }) => {
15
15
  const { width } = useScreenDimensions();
16
16
  const space = useSpace();
17
17
  // Assumes small left and right elements, it protects from overflowing
18
18
  // but doesn't cover edge cases where right or left are bigger
19
19
  const centerMaxWidth = width - space(4) - DEFAULT_ICON_SIZE * 2;
20
- return (_jsxs(Flex, { height: NAVBAR_HEIGHT, flexDirection: "row", px: 2, zIndex: ZINDEX.header, backgroundColor: "background", alignItems: "center", children: [_jsx(Flex, { flex: 1, children: _jsx(Left, { leftElements: leftElements, onBack: onBack, hideLeftElements: hideLeftElements }) }), _jsx(Flex, { maxWidth: centerMaxWidth, ...titleProps, children: _jsx(Center, { animated: animated, title: title, hideTitle: hideTitle }) }), _jsx(Flex, { flex: 1, alignItems: "flex-end", children: _jsx(Right, { rightElements: rightElements, hideRightElements: hideRightElements }) })] }));
20
+ return (_jsxs(Flex, { height: NAVBAR_HEIGHT, flexDirection: "row", px: 2, zIndex: zIndex, backgroundColor: "background", alignItems: "center", children: [_jsx(Flex, { flex: 1, children: _jsx(Left, { leftElements: leftElements, onBack: onBack, hideLeftElements: hideLeftElements }) }), _jsx(Flex, { maxWidth: centerMaxWidth, ...titleProps, children: _jsx(Center, { animated: animated, title: title, hideTitle: hideTitle }) }), _jsx(Flex, { flex: 1, alignItems: "flex-end", children: _jsx(Right, { rightElements: rightElements, hideRightElements: hideRightElements }) })] }));
21
21
  };
22
22
  const Right = ({ hideRightElements, rightElements }) => {
23
23
  return _jsx(_Fragment, { children: !hideRightElements && rightElements });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "22.1.0--canary.425.5080.0",
3
+ "version": "22.1.0--canary.425.5083.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "workspaces": [
6
6
  "Example"