1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/components/ascribe_detail/license_detail.js

32 lines
763 B
JavaScript
Raw Normal View History

'use strict';
import React from 'react';
import DetailProperty from './detail_property';
/**
* This is the component that implements display-specific functionality
*/
let LicenseDetail = React.createClass({
propTypes: {
license: React.PropTypes.object
},
render () {
if (this.props.license.code === 'default') {
return null;
}
return (
<DetailProperty
label="LICENSE"
value={
<a href={this.props.license.url} target="_blank">
{ this.props.license.code.toUpperCase() + ': ' + this.props.license.name}
</a>
}
/>
);
}
});
export default LicenseDetail;