2018-01-13 02:01:27 +00:00
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
import DescriptionList from 'Components/DescriptionList/DescriptionList';
|
|
|
|
import DescriptionListItem from 'Components/DescriptionList/DescriptionListItem';
|
2022-05-20 04:15:43 +00:00
|
|
|
import Button from 'Components/Link/Button';
|
2018-01-13 02:01:27 +00:00
|
|
|
import Modal from 'Components/Modal/Modal';
|
|
|
|
import ModalBody from 'Components/Modal/ModalBody';
|
2022-05-20 04:15:43 +00:00
|
|
|
import ModalContent from 'Components/Modal/ModalContent';
|
2018-01-13 02:01:27 +00:00
|
|
|
import ModalFooter from 'Components/Modal/ModalFooter';
|
2022-05-20 04:15:43 +00:00
|
|
|
import ModalHeader from 'Components/Modal/ModalHeader';
|
2018-01-13 02:01:27 +00:00
|
|
|
|
2021-07-08 22:27:23 +00:00
|
|
|
class BlocklistDetailsModal extends Component {
|
2018-01-13 02:01:27 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Render
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const {
|
|
|
|
isOpen,
|
|
|
|
sourceTitle,
|
|
|
|
protocol,
|
|
|
|
indexer,
|
|
|
|
message,
|
|
|
|
onModalClose
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal
|
|
|
|
isOpen={isOpen}
|
|
|
|
onModalClose={onModalClose}
|
|
|
|
>
|
|
|
|
<ModalContent
|
|
|
|
onModalClose={onModalClose}
|
|
|
|
>
|
|
|
|
<ModalHeader>
|
|
|
|
Details
|
|
|
|
</ModalHeader>
|
|
|
|
|
|
|
|
<ModalBody>
|
|
|
|
<DescriptionList>
|
|
|
|
<DescriptionListItem
|
|
|
|
title="Name"
|
|
|
|
data={sourceTitle}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<DescriptionListItem
|
|
|
|
title="Protocol"
|
|
|
|
data={protocol}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{
|
|
|
|
!!message &&
|
|
|
|
<DescriptionListItem
|
|
|
|
title="Indexer"
|
|
|
|
data={indexer}
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
!!message &&
|
|
|
|
<DescriptionListItem
|
|
|
|
title="Message"
|
|
|
|
data={message}
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
</DescriptionList>
|
|
|
|
</ModalBody>
|
|
|
|
|
|
|
|
<ModalFooter>
|
|
|
|
<Button onPress={onModalClose}>
|
|
|
|
Close
|
|
|
|
</Button>
|
|
|
|
</ModalFooter>
|
|
|
|
</ModalContent>
|
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-08 22:27:23 +00:00
|
|
|
BlocklistDetailsModal.propTypes = {
|
2018-01-13 02:01:27 +00:00
|
|
|
isOpen: PropTypes.bool.isRequired,
|
|
|
|
sourceTitle: PropTypes.string.isRequired,
|
|
|
|
protocol: PropTypes.string.isRequired,
|
|
|
|
indexer: PropTypes.string,
|
|
|
|
message: PropTypes.string,
|
|
|
|
onModalClose: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
|
2021-07-08 22:27:23 +00:00
|
|
|
export default BlocklistDetailsModal;
|