accounts-frontend/src/components/auth/RejectionLink.jsx

26 lines
580 B
React
Raw Normal View History

import React, { PropTypes } from 'react';
import { FormattedMessage as Message } from 'react-intl';
export default function RejectionLink(props, context) {
return (
<a href="#" onClick={(event) => {
event.preventDefault();
context.reject();
}}>
<Message {...props.label} />
</a>
);
}
RejectionLink.displayName = 'RejectionLink';
RejectionLink.propTypes = {
label: PropTypes.shape({
id: PropTypes.string
}).isRequired
};
RejectionLink.contextTypes = {
reject: PropTypes.func.isRequired
};