2016-08-23 18:59:26 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*
|
2016-09-07 18:15:44 +00:00
|
|
|
* @providesModule ExcerptLink
|
2016-08-23 18:59:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var React = require('React');
|
|
|
|
|
2016-09-07 18:15:44 +00:00
|
|
|
var ExcerptLink = React.createClass({
|
2016-08-23 18:59:26 +00:00
|
|
|
render: function() {
|
2016-09-07 18:15:44 +00:00
|
|
|
var cta = "Read more";
|
|
|
|
|
|
|
|
if (this.props.category === "videos") {
|
|
|
|
cta = "Watch video";
|
|
|
|
}
|
|
|
|
|
2016-08-23 18:59:26 +00:00
|
|
|
return (
|
|
|
|
<footer className="entry-readmore">
|
|
|
|
<a href={this.props.href} className="btn">
|
2016-09-07 18:15:44 +00:00
|
|
|
{cta}
|
2016-08-23 18:59:26 +00:00
|
|
|
</a>
|
|
|
|
</footer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-09-07 18:15:44 +00:00
|
|
|
module.exports = ExcerptLink;
|