PHP 7.4.33
Preview: splitLayoutProps.js Size: 1.89 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/StyleSheet/splitLayoutProps.js
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 */

import type {____ViewStyle_Internal} from './StyleSheetTypes';

export default function splitLayoutProps(props: ?____ViewStyle_Internal): {
  outer: ?____ViewStyle_Internal,
  inner: ?____ViewStyle_Internal,
} {
  let outer: ?____ViewStyle_Internal = null;
  let inner: ?____ViewStyle_Internal = null;

  if (props != null) {
    // $FlowIgnore[incompatible-exact] Will contain a subset of keys from `props`.
    outer = {};
    // $FlowIgnore[incompatible-exact] Will contain a subset of keys from `props`.
    inner = {};

    for (const prop of Object.keys(props)) {
      switch (prop) {
        case 'margin':
        case 'marginHorizontal':
        case 'marginVertical':
        case 'marginBottom':
        case 'marginTop':
        case 'marginLeft':
        case 'marginRight':
        case 'flex':
        case 'flexGrow':
        case 'flexShrink':
        case 'flexBasis':
        case 'alignSelf':
        case 'height':
        case 'minHeight':
        case 'maxHeight':
        case 'width':
        case 'minWidth':
        case 'maxWidth':
        case 'position':
        case 'left':
        case 'right':
        case 'bottom':
        case 'top':
        case 'transform':
        case 'transformOrigin':
        case 'rowGap':
        case 'columnGap':
        case 'gap':
          // $FlowFixMe[cannot-write]
          // $FlowFixMe[incompatible-use]
          // $FlowFixMe[prop-missing]
          outer[prop] = props[prop];
          break;
        default:
          // $FlowFixMe[cannot-write]
          // $FlowFixMe[incompatible-use]
          // $FlowFixMe[prop-missing]
          inner[prop] = props[prop];
          break;
      }
    }
  }

  return {outer, inner};
}

Directory Contents

Dirs: 2 × Files: 28
Name Size Perms Modified Actions
private DIR
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
496 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.27 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
917 B lrwxr-xr-x 2025-03-28 11:04:42
Edit Download
1.19 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
496 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
3.62 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
619 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
692 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
756 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
578 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
309 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.41 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
11.34 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
5.18 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
432 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.63 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
907 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
8.63 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
689 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
7.45 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.72 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
637 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
703 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.89 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.57 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
10.87 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
15.77 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
33.42 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).