您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

OverlayFrame.js 878B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // @flow
  2. import React, { Component, type Node } from 'react';
  3. import { SafeAreaView, View } from 'react-native';
  4. import styles from './styles';
  5. /**
  6. * The type of the React {@code Component} props of {@code OverlayFrame}.
  7. */
  8. type Props = {
  9. /**
  10. * The children components to be displayed into the overlay frame.
  11. */
  12. children: Node,
  13. };
  14. /**
  15. * Implements a React component to act as the frame for overlays.
  16. */
  17. export default class OverlayFrame extends Component<Props> {
  18. /**
  19. * Implements React's {@link Component#render()}.
  20. *
  21. * @inheritdoc
  22. * @returns {ReactElement}
  23. */
  24. render() {
  25. return (
  26. <View style = { styles.container }>
  27. <SafeAreaView style = { styles.safeContainer } >
  28. { this.props.children }
  29. </SafeAreaView>
  30. </View>
  31. );
  32. }
  33. }