Skip to content

Instantly share code, notes, and snippets.

@LukeMwila
Created May 8, 2019 18:32
Show Gist options
  • Save LukeMwila/5f48f7a88911072b43b4040838c6a714 to your computer and use it in GitHub Desktop.
Save LukeMwila/5f48f7a88911072b43b4040838c6a714 to your computer and use it in GitHub Desktop.
Presentation component for displaying error message
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