{"size": 683, "ext": "js", "max_stars_repo_path": "src/Error/Error.js", "max_stars_repo_name": "lnormanha/reinput", "max_stars_repo_stars_event_min_datetime": "2020-04-14T15:41:54.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-14T15:41:54.000Z", "max_issues_repo_path": "src/Error/Error.js", "max_issues_repo_name": "lnormanha/reinput", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Error/Error.js", "max_forks_repo_name": "lnormanha/reinput", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.3928571429, "max_line_length": 85, "alphanum_fraction": 0.6442166911}
import React from 'react'
import { Text, View } from 'react-native'

import { defaultProps, propTypes } from './props'
import * as styles from './styles'

/**
 * @typedef {typeof defaultProps} Props
 * @augments {React.Component<Props, {}>}
 */
export default class ReinputError extends React.Component {
  static propTypes = propTypes
  static defaultProps = defaultProps

  render () {
    return this.props.error ? (
      <Text
        numberOfLines={this.props.errorMaxLines}
        style={[styles.error, {color: this.props.errorColor}, this.props.errorStyle]}
      >
        {this.props.error}
      </Text>
    ) : (
      <View styles={styles.placeholder()} />
    )
  }
}
