/** * 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. * * @format * @flow */ import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import RNTesterText from '../../components/RNTesterText'; import {useTheme} from '../../components/RNTesterTheme'; import {View} from 'react-native'; function InlineView(props: { textAlign: 'auto' | 'left' | 'right' | 'center' | 'justify', long?: boolean, }): React.Node { return ( Parent Child Child {props !== null && props.long === true && ( aaaa a aaaa aaaaaa aaa a a a aaaaa sdsds dsdSAD asd ASDasd ASDas )} ); } function TextInlineViewsExample(props: {}): React.Node { return ( BoringLayout StaticLayout ); } function EmptyTextExample(): React.Node { const {BorderColor} = useTheme(); return ( ); } export default [ { title: 'Empty Text', name: 'emptyText', render: EmptyTextExample, }, { title: 'TextInlineViewsExample', name: 'inlineViews', description: 'Shows how inline views are rendered when text is subject to alignment.', expect: 'The red box should align correctly with the rest of the text.', render: TextInlineViewsExample, }, ] as $ReadOnlyArray;