-
Notifications
You must be signed in to change notification settings - Fork 12
/
FromConceptLabel.jsx
29 lines (28 loc) · 1.04 KB
/
FromConceptLabel.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
import React from 'react';
import { Link } from 'react-router-dom';
import {LocalOffer as LocalOfferIcon} from '@material-ui/icons'
import ResourceLabel from '../common/ResourceLabel';
import { DARKGRAY } from '../../common/constants';
const FromConceptLabel = props => {
const labelComponent = <ResourceLabel
owner={props.from_source_owner}
parent={props.from_source_name}
id={props.from_concept_code}
name={props.from_concept_name}
icon={
<LocalOfferIcon
fontSize='small'
style={{width: '10pt', color: DARKGRAY}}
/>
} />;
return (
<React.Fragment>
{
props.from_concept_url ?
<Link to={props.from_concept_url}>{labelComponent}</Link>:
<span>{labelComponent}</span>
}
</React.Fragment>
)
}
export default FromConceptLabel;