Created
May 8, 2019 18:32
-
-
Save LukeMwila/5f48f7a88911072b43b4040838c6a714 to your computer and use it in GitHub Desktop.
Presentation component for displaying error message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import styled from "styled-components"; | |
/** Theme */ | |
import { Colors } from "../Theme"; | |
type ErrorMessageProps = { | |
errorMessage: string | null; | |
}; | |
const ErrorMessage = styled.p` | |
text-align: center; | |
margin-top: 10px; | |
color: ${Colors.red}; | |
`; | |
const ErrorMessageContainer: React.SFC<ErrorMessageProps> = ({ | |
errorMessage | |
}) => { | |
return <ErrorMessage>{errorMessage}</ErrorMessage>; | |
}; | |
export default ErrorMessageContainer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment