23 lines
720 B
TypeScript
23 lines
720 B
TypeScript
import Card from "@material-ui/core/Card";
|
|
import CardContent from "@material-ui/core/CardContent";
|
|
import Typography from "@material-ui/core/Typography";
|
|
import React from "react";
|
|
import { FormattedMessage } from "react-intl";
|
|
interface ErrorMessageCardProps {
|
|
message: string;
|
|
}
|
|
|
|
const ErrorMessageCard: React.StatelessComponent<ErrorMessageCardProps> = ({
|
|
message
|
|
}) => (
|
|
<Card>
|
|
<CardContent>
|
|
<Typography variant="h5" component="h2">
|
|
<FormattedMessage defaultMessage="Error" description="header" />
|
|
</Typography>
|
|
<Typography variant="body2">{message}</Typography>
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
ErrorMessageCard.displayName = "ErrorMessageCard";
|
|
export default ErrorMessageCard;
|