{"size": 366, "ext": "js", "max_stars_repo_path": "part2/phonebook/src/components/ErrorMsg.js", "max_stars_repo_name": "cmattey/fullstackopen_chai", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "part2/phonebook/src/components/ErrorMsg.js", "max_issues_repo_name": "cmattey/fullstackopen_chai", "max_issues_repo_issues_event_min_datetime": "2021-03-09T17:48:42.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T10:32:35.000Z", "max_forks_repo_path": "part2/phonebook/src/components/ErrorMsg.js", "max_forks_repo_name": "cmattey/fullstackopen_chai", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 24, "max_forks_count": null, "avg_line_length": 15.25, "max_line_length": 45, "alphanum_fraction": 0.5327868852}
import React from 'react'

const ErrorMsg = ({message})=>{

    const msgStyle = {
      color: 'red',
      fontStyle: 'bold',
      border: 'solid',
      borderRadius: '5px',
      background:'lightgray'
    }
    if(message){
      return(
        <div style={msgStyle}>{message}</div>
      )
    }
    else{
      return null
    }

}

export default ErrorMsg
