1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-26 03:06:28 +02:00
onion/js/components/ascribe_detail/license_detail.js
2015-09-29 15:58:24 +02:00

32 lines
763 B
JavaScript

'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;