-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source-home | details and other tabs (wip)
- Loading branch information
1 parent
a22bca4
commit b476f3d
Showing
17 changed files
with
503 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react'; | ||
import { | ||
Accordion, AccordionSummary, AccordionDetails, Typography | ||
} from '@material-ui/core'; | ||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; | ||
import { map, isEmpty } from 'lodash'; | ||
|
||
const None = () => { | ||
return <div style={{margin: '5px', fontWeight: '300'}}>None</div> | ||
} | ||
|
||
const CustomAttributesAccordian = ({ | ||
headingStyles, detailStyles, attributes | ||
}) => { | ||
return ( | ||
<Accordion defaultExpanded> | ||
<AccordionSummary | ||
className='light-gray-bg' | ||
expandIcon={<ExpandMoreIcon />} | ||
aria-controls="panel1a-content" | ||
> | ||
<Typography style={headingStyles}>Custom Attributes</Typography> | ||
</AccordionSummary> | ||
<AccordionDetails style={detailStyles}> | ||
{ | ||
isEmpty(attributes) ? | ||
None() : | ||
map(attributes, (value, name) => ( | ||
<div className='col-md-12' style={{marginBottom: '5px'}} key={name}> | ||
<div style={{fontWeight: '300'}} className='col-md-4 no-left-padding'> | ||
{name} | ||
</div> | ||
<div className='col-md-4 no-right-padding'> | ||
{value} | ||
</div> | ||
</div> | ||
)) | ||
} | ||
</AccordionDetails> | ||
</Accordion> | ||
) | ||
} | ||
|
||
export default CustomAttributesAccordian; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { | ||
LocalOffer as LocalOfferIcon | ||
} from '@material-ui/icons'; | ||
import { Tooltip } from '@material-ui/core'; | ||
import { toFullAPIURL, copyURL } from '../../common/utils'; | ||
|
||
const ConceptIcon = ({ url }) => { | ||
const onIconClick = () => copyURL(toFullAPIURL(url)) | ||
|
||
return ( | ||
<div className='no-side-padding col-md-1 home-icon concept'> | ||
<Tooltip title='Copy URL'> | ||
<LocalOfferIcon onClick={onIconClick} /> | ||
</Tooltip> | ||
</div> | ||
); | ||
} | ||
|
||
export default ConceptIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
import { | ||
Link as LinkIcon, | ||
} from '@material-ui/icons'; | ||
import { Tooltip } from '@material-ui/core'; | ||
import { toFullAPIURL, copyURL } from '../../common/utils'; | ||
|
||
const MappingIcon = ({ url }) => { | ||
const onIconClick = () => copyURL(toFullAPIURL(url)) | ||
|
||
return ( | ||
<div className='no-side-padding col-md-1 home-icon mapping'> | ||
<Tooltip title='Copy URL'> | ||
<LinkIcon onClick={onIconClick} /> | ||
</Tooltip> | ||
</div> | ||
); | ||
} | ||
|
||
export default MappingIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.