Files
mostlymatter/webapp/components/integrations/components/delete_integration.jsx
Christopher Speller 2bbedd9def Updating client dependencies. Switching to yarn. (#6433)
* Updating client dependancies. Switching to using yarn.

* Updating React

* Moving pure components to using function syntax (performance gains with newer react version)

* Updating client dependancies.

* Ignore .yarninstall

* Enabling pre-lockfile because it's the entire point of using yarn.

* Removing old webpack config

* Moving to new prop-types

* Fixing ESLint Errors

* Updating jest snapshots.

* Cleaning up package.json
2017-05-18 09:28:18 -04:00

52 строки
1.4 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import {FormattedMessage} from 'react-intl';
import DeleteModalTrigger from '../../delete_modal_trigger.jsx';
export default class DeleteIntegration extends DeleteModalTrigger {
get triggerTitle() {
return (
<FormattedMessage
id='installed_integrations.delete'
defaultMessage='Delete'
/>
);
}
get modalTitle() {
return (
<FormattedMessage
id='integrations.delete.confirm.title'
defaultMessage='Delete Integration'
/>
);
}
get modalMessage() {
return (
<div className='alert alert-warning'>
<i className='fa fa-warning fa-margin--right'/>
<FormattedMessage
id={this.props.messageId}
defaultMessage='This action permanently deletes the integration and breaks any integrations using it. Are you sure you want to delete it?'
/>
</div>
);
}
get modalConfirmButton() {
return (
<FormattedMessage
id='integrations.delete.confirm.button'
defaultMessage='Delete'
/>
);
}
}
DeleteIntegration.propTypes = {
messageId: PropTypes.string.isRequired,
onDelete: PropTypes.func.isRequired
};