Add FileUnavailableMessage component

This commit is contained in:
Alex Liebowitz 2017-01-21 01:48:30 -05:00
parent 3e33b5a2e8
commit 42517587ee
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,23 @@
import React from 'react';
import {Link, ToolTipLink} from '../component/link.js';
const FileUnavailableMessage = React.createClass({
_unavailableMessage: "The content on LBRY is hosted by its users. It appears there are no users " +
"connected that have this file at the moment.",
propTypes: {
onShowActionsClicked: React.PropTypes.func,
},
render: function() {
return (
<div className="file-unavailable-message">
<span className="empty">This file is not currently available.</span> { ' ' }
<ToolTipLink label="Why?" tooltip={this._unavailableMessage} className="not-available-tooltip-link" /> { ' ' }
{'onShowActionsClicked' in this.props
? <Link label="Try Anyway" className="button-text" onClick={this.props.onShowActionsClicked} />
: null}
</div>
);
}
});
export default FileUnavailableMessage;

View file

@ -0,0 +1,13 @@
.file-unavailable-message {
font-size: 14px;
.not-available-tooltip-link__tooltip { /* temporary */
left: -225px;
}
.not-available-tooltip-link__link {
@include text-link();
font-size: 14px;
vertical-align: baseline;
}
}