created separate packages for @scm-manager/ui-types and @scm-manager/ui-components

This commit is contained in:
Sebastian Sdorra
2018-08-31 13:06:01 +02:00
parent d20b69ea23
commit 0a0fd7a261
71 changed files with 19040 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
//@flow
import React from "react";
import { translate } from "react-i18next";
import Notification from "./Notification";
type Props = {
t: string => string,
error?: Error
};
class ErrorNotification extends React.Component<Props> {
render() {
const { t, error } = this.props;
if (error) {
return (
<Notification type="danger">
<strong>{t("error-notification.prefix")}:</strong> {error.message}
</Notification>
);
}
return "";
}
}
export default translate("commons")(ErrorNotification);