@artsy/palette-mobile 13.2.9 → 13.2.11

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.
@@ -3,5 +3,6 @@ import { FlexProps } from "../Flex";
3
3
  export interface BodyProps extends FlexProps {
4
4
  fullwidth?: boolean;
5
5
  scroll?: boolean;
6
+ disableKeyboardAvoidance?: boolean;
6
7
  }
7
8
  export declare const Body: React.FC<BodyProps>;
@@ -2,10 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Body = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
5
6
  const react_native_1 = require("react-native");
6
7
  const constants_1 = require("./constants");
7
8
  const Flex_1 = require("../Flex");
8
- const Body = ({ children, fullwidth, scroll, ...flexProps }) => {
9
- return ((0, jsx_runtime_1.jsx)(react_native_1.KeyboardAvoidingView, { style: { flex: 1 }, behavior: react_native_1.Platform.OS === "ios" ? "padding" : "height", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, ...flexProps, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, px: fullwidth ? undefined : constants_1.SCREEN_HORIZONTAL_PADDING, children: scroll ? (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { children: children }) : children }) }) }));
9
+ const Body = ({ children, fullwidth, scroll, disableKeyboardAvoidance = false, ...flexProps }) => {
10
+ const Wrapper = disableKeyboardAvoidance ? react_1.Fragment : react_native_1.KeyboardAvoidingView;
11
+ return ((0, jsx_runtime_1.jsx)(Wrapper, { ...(disableKeyboardAvoidance
12
+ ? {}
13
+ : { style: { flex: 1 }, behavior: react_native_1.Platform.OS === "ios" ? "padding" : "height" }), children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, ...flexProps, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flex: 1, px: fullwidth ? undefined : constants_1.SCREEN_HORIZONTAL_PADDING, children: scroll ? (0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { children: children }) : children }) }) }));
10
14
  };
11
15
  exports.Body = Body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "13.2.9",
3
+ "version": "13.2.11",
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",