accounts-frontend/src/components/auth/permissions/Permissions.jsx

33 lines
900 B
React
Raw Normal View History

import React, { PropTypes } from 'react';
import { FormattedMessage as Message } from 'react-intl';
2016-05-14 16:56:17 +05:30
import { Button } from 'components/ui/form';
import AuthTitle from 'components/auth/AuthTitle';
2016-05-14 16:56:17 +05:30
import messages from './Permissions.intl.json';
import Body from './PermissionsBody';
export default function Permissions() {
const componentsMap = {
2016-05-14 16:56:17 +05:30
Title: () => <AuthTitle title={messages.permissionsTitle} />,
Body,
2016-05-14 16:56:17 +05:30
Footer: () => <Button color="orange" autoFocus label={messages.approve} />,
Links: (props, context) => (
<a href="#" onClick={(event) => {
event.preventDefault();
context.reject();
}}>
<Message {...messages.decline} />
</a>
)
};
componentsMap.Links.contextTypes = {
reject: PropTypes.func.isRequired
};
return componentsMap;
}