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

TestHint.ios.js 985B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* @flow */
  2. import React, { Component } from 'react';
  3. import { Text } from 'react-native';
  4. import { connect } from '../../redux';
  5. import type { TestHintProps } from './AbstractTestHint';
  6. import { _mapStateToProps } from './AbstractTestHint';
  7. /**
  8. * This is the iOS version of the TestHint.
  9. *
  10. * Be sure to check the description in TestHint.android and AbstractTestHint
  11. * files to understand what a test hint is and why different iOS and Android
  12. * components are necessary.
  13. */
  14. class TestHint extends Component<TestHintProps> {
  15. /**
  16. * Renders the test hint on Android.
  17. *
  18. * @returns {ReactElement}
  19. */
  20. render() {
  21. if (!this.props._testModeEnabled) {
  22. return null;
  23. }
  24. return (
  25. <Text
  26. accessibilityLabel = { this.props.value }
  27. onPress = { this.props.onPress }
  28. testID = { this.props.id } />
  29. );
  30. }
  31. }
  32. export default connect(_mapStateToProps)(TestHint);