mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-05 04:59:26 +05:30
26 lines
580 B
React
26 lines
580 B
React
|
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
|
||
|
};
|