2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017-2018 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 import React from 'react';
22 import { PropTypes } from 'prop-types';
23 import Button from 'react-bootstrap/lib/Button.js';
25 import i18n from 'utils/i18n/i18n.js';
26 import Modal from 'generic-components/modal/Modal.jsx';
36 class ConfirmationModalView extends React.Component {
40 type: PropTypes.oneOf(['default', 'error', 'warning', 'success']),
42 title: PropTypes.string,
43 confirmationDetails: PropTypes.object
46 static defaultProps = {
54 let {title, type, msg, show} = this.props;
57 <Modal show={show} className={`notification-modal ${typeClass[type]}`}
60 <Modal.Title>{title}</Modal.Title>
62 <Modal.Body>{msg}</Modal.Body>
64 <Button bsStyle={typeClass[type]}
65 onClick={() => this.props.onDeclined(this.props.confirmationDetails)}>{i18n(
67 <Button bsStyle={typeClass[type]}
68 onClick={() => this.props.onConfirmed(this.props.confirmationDetails)}>{i18n(
76 export default ConfirmationModalView;