@artsy/palette-mobile 11.0.30 → 11.0.31

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v11.0.31 (Fri Jun 02 2023)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - fix(header): make text more configurable [#105](https://github.com/artsy/palette-mobile/pull/105) ([@damassi](https://github.com/damassi))
6
+
7
+ #### Authors: 1
8
+
9
+ - Christopher Pappas ([@damassi](https://github.com/damassi))
10
+
11
+ ---
12
+
1
13
  # v11.0.30 (Thu Jun 01 2023)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { FlexProps } from "../Flex";
3
3
  export interface HeaderProps {
4
4
  animated?: boolean;
@@ -53,14 +53,14 @@ const Header = ({ animated = false, hideLeftElements, hideRightElements, hideTit
53
53
  return null;
54
54
  }
55
55
  if (!animated) {
56
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, ...titleProps, justifySelf: "stretch", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", numberOfLines: 1, children: title }) }));
57
- }
58
- if (scrollY < constants_1.NAVBAR_HEIGHT) {
59
- return (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, flexDirection: "row" });
56
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, justifySelf: "stretch", ...titleProps, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", numberOfLines: 1, children: title }) }));
60
57
  }
58
+ // Show / hide the title to avoid rerenders, which retrigger the animation
59
+ const display = scrollY < constants_1.NAVBAR_HEIGHT ? "none" : "flex";
61
60
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { entering: react_native_reanimated_1.FadeInDown.duration(400).easing(react_native_reanimated_1.Easing.out(react_native_reanimated_1.Easing.exp)), exiting: react_native_reanimated_1.FadeOut.duration(400).easing(react_native_reanimated_1.Easing.out(react_native_reanimated_1.Easing.exp)), style: {
61
+ display,
62
62
  flex: 1,
63
- }, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", numberOfLines: 1, children: title }) }) }) }));
63
+ }, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", ...titleProps, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "md", numberOfLines: 1, children: title }) }) }) }));
64
64
  };
65
65
  const Right = () => {
66
66
  if (hideRightElements) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "11.0.30",
3
+ "version": "11.0.31",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "react-native run-android",