accounts-frontend/src/components/auth/authError/AuthError.jsx

19 lines
494 B
React
Raw Normal View History

import React, { PropTypes } from 'react';
import errorsDict from 'services/errorsDict';
import { PanelBodyHeader } from 'components/ui/Panel';
export default function AuthError({error, onClose = function() {}}) {
return (
<PanelBodyHeader type="error" onClose={onClose}>
{errorsDict.resolve(error)}
</PanelBodyHeader>
);
}
AuthError.displayName = 'AuthError';
AuthError.propTypes = {
error: PropTypes.string.isRequired,
onClose: PropTypes.func
};