-
Notifications
You must be signed in to change notification settings - Fork 12
/
AboutAccordian.jsx
40 lines (37 loc) · 1.11 KB
/
AboutAccordian.jsx
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
import React from 'react';
import {
Accordion, AccordionSummary, AccordionDetails, Typography
} from '@material-ui/core';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
const ACCORDIAN_HEADING_STYLES = {
fontWeight: 'bold',
}
const ACCORDIAN_DETAILS_STYLES = {
display: 'inline-block', width: '100%', textAlign: 'left',
}
const AboutAccordian = ({id, about}) => {
return (
<div className='col-md-12'>
<Accordion defaultExpanded>
<AccordionSummary
className='light-gray-bg less-paded-accordian-header'
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
>
<Typography style={ACCORDIAN_HEADING_STYLES}>{`About ${id}`}</Typography>
</AccordionSummary>
<AccordionDetails style={ACCORDIAN_DETAILS_STYLES}>
{
about ?
<div
className='col-md-12 no-side-padding'
dangerouslySetInnerHTML={{__html: about}}
/> :
<p>No about entry</p>
}
</AccordionDetails>
</Accordion>
</div>
);
}
export default AboutAccordian;