Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

TestHint.ios.tsx 929B

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