This repository was archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 372
Expand file tree
/
Copy pathindex.js
More file actions
59 lines (52 loc) · 1.59 KB
/
index.js
File metadata and controls
59 lines (52 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React, { PropTypes } from 'react';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
import Loader from 'components/Loader';
const style = require('./style.scss');
const SurahInfo = ({ surah, isShowingSurahInfo, onClose, loadInfo }) => {
// So we don't need to load images and files unless needed
if (!isShowingSurahInfo) return <noscript />;
if (!surah.info) {
return <Loader />;
}
return (
<Col xs={12} className={`${style.container} surah-info ${style.show}`}>
<div
className={`${style.close} ss-delete`}
onClick={() => onClose({isShowingSurahInfo: !isShowingSurahInfo})}
/>
<Row className={style.row}>
<Col
md={3}
xs={6}
className={`${style.bg} ${style[surah.revelation.place]}`}
/>
<Col md={1} xs={6} className={style.list}>
<dl>
<dt>VERSES</dt>
<dd className="text-uppercase">{surah.ayat}</dd>
<dt>PAGES</dt>
<dd className="text-uppercase">{surah.page.join('-')}</dd>
</dl>
</Col>
<Col md={8} className={`${style.info} times-new`}>
<div dangerouslySetInnerHTML={{__html: surah.info.description}} />
<div>
<p>
<em>
Source: {surah.info.contentSource}
</em>
</p>
</div>
</Col>
</Row>
</Col>
);
};
SurahInfo.propTypes = {
onClose: PropTypes.func,
loadInfo: PropTypes.func,
isShowingSurahInfo: PropTypes.bool,
surah: PropTypes.object
};
export default SurahInfo;