diff --git a/src/browser/components/HoveringURL.jsx b/src/browser/components/HoveringURL.jsx index d15fdff9..65bb3d67 100644 --- a/src/browser/components/HoveringURL.jsx +++ b/src/browser/components/HoveringURL.jsx @@ -1,27 +1,9 @@ const React = require('react'); -const style = { - color: 'gray', - backgroundColor: 'whitesmoke', - maxWidth: '95%', - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - position: 'absolute', - bottom: 0, - paddingLeft: 4, - paddingRight: 16, - paddingTop: 2, - paddingBottom: 2, - borderTopRightRadius: 4, - borderTop: 'solid thin lightgray', - borderRight: 'solid thin lightgray' -}; - class HoveringURL extends React.Component { render() { return ( -
+
{this.props.targetURL}
); @@ -29,6 +11,7 @@ class HoveringURL extends React.Component { } HoveringURL.propTypes = { + style: React.PropTypes.object, targetURL: React.PropTypes.string }; diff --git a/src/browser/components/MainPage.jsx b/src/browser/components/MainPage.jsx index b5726f1b..831d1f27 100644 --- a/src/browser/components/MainPage.jsx +++ b/src/browser/components/MainPage.jsx @@ -10,6 +10,28 @@ const MattermostView = require('./MattermostView.jsx'); const TabBar = require('./TabBar.jsx'); const HoveringURL = require('./HoveringURL.jsx'); +// Todo: Need to consider better way to apply styles +const styles = { + hoveringURL: { + color: 'gray', + backgroundColor: 'whitesmoke', + maxWidth: '95%', + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + position: 'absolute', + bottom: 0, + paddingLeft: 4, + paddingRight: 16, + paddingTop: 2, + paddingBottom: 2, + borderTopRightRadius: 4, + borderTop: 'solid thin lightgray', + borderRight: 'solid thin lightgray', + pointerEvents: 'none' + } +}; + const MainPage = React.createClass({ propTypes: { disablewebsecurity: React.PropTypes.bool.isRequired, @@ -292,6 +314,7 @@ const MainPage = React.createClass({ null : }