Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1013 | custom attributes | raw/formatted sw…
Browse files Browse the repository at this point in the history
…itch with labels
  • Loading branch information
snyaggarwal committed Oct 6, 2021
1 parent a8e5452 commit 7ac6b90
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/components/common/CustomAttributesAccordian.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {
Accordion, AccordionSummary, AccordionDetails, FormControlLabel, Switch
Accordion, AccordionSummary, AccordionDetails, Switch, Grid, Typography
} from '@material-ui/core';
import {
map, isEmpty, isBoolean, isArray, isObject, find, startCase, keys, orderBy
Expand Down Expand Up @@ -49,10 +49,19 @@ const CustomAttributesAccordian = ({headingStyles, detailStyles, attributes}) =>
{
hasAttributes &&
<span onClick={onRawClick}>
<FormControlLabel
control={<Switch size='small' checked={raw} onChange={onRawClick} name="raw" color='primary' />}
label={<span style={{fontSize: '14px', color: raw ? BLUE : 'gray'}}>Raw</span>}
/>
<Typography component="div">
<Grid component="label" container alignItems="center" spacing={1}>
<Grid item>
<span style={{fontSize: '14px', color: raw ? 'gray' : BLUE}}>formatted</span>
</Grid>
<Grid item>
<Switch size='small' checked={raw} onChange={onRawClick} name="raw" color='primary' />
</Grid>
<Grid item>
<span style={{fontSize: '14px', color: raw ? BLUE : 'gray'}}>raw</span>
</Grid>
</Grid>
</Typography>
</span>
}
</span>
Expand Down

0 comments on commit 7ac6b90

Please sign in to comment.