{"size": 468, "ext": "js", "max_stars_repo_path": "components/FormErrorMessage.js", "max_stars_repo_name": "curbAA/open-fit", "max_stars_repo_stars_event_min_datetime": "2021-04-12T07:39:07.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-14T12:41:19.000Z", "max_issues_repo_path": "components/FormErrorMessage.js", "max_issues_repo_name": "curbAA/open-fit", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "components/FormErrorMessage.js", "max_forks_repo_name": "curbAA/open-fit", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.5, "max_line_length": 71, "alphanum_fraction": 0.6431623932}
import React from "react";
import { StyleSheet, Text, View } from "react-native";

const ErrorMessage = ({ displayError, textStyle, containerStyle }) => {
	if (displayError) {
		return (
			<View style={[containerStyle, styles.container]}>
				<Text style={[textStyle, styles.text]}>Invalid Fields</Text>
			</View>
		);
	} else {
		return <></>;
	}
};

export default ErrorMessage;

const styles = StyleSheet.create({
	container: {},
	text: {
		color: "red",
	},
});
