aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui
diff options
context:
space:
mode:
authorLibravatar Gustavo Sampaio <gbritosampaio@gmail.com>2017-10-21 21:49:22 -0300
committerLibravatar Gustavo Sampaio <gbritosampaio@gmail.com>2017-10-21 21:49:22 -0300
commit80f12d79251d28679becff126a4da095eb52f640 (patch)
treeca5acdd2a82fe12f034b3816db2d3d0eb1bb5afd /src/components/ui
parentMove linux distribution specific dependencies to /docs (diff)
downloadferdium-app-80f12d79251d28679becff126a4da095eb52f640.tar.gz
ferdium-app-80f12d79251d28679becff126a4da095eb52f640.tar.zst
ferdium-app-80f12d79251d28679becff126a4da095eb52f640.zip
Show url when mouse enters a link
This resolves #47
Diffstat (limited to 'src/components/ui')
-rw-r--r--src/components/ui/StatusBarTargetUrl.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/components/ui/StatusBarTargetUrl.js b/src/components/ui/StatusBarTargetUrl.js
new file mode 100644
index 000000000..1c8dce0f7
--- /dev/null
+++ b/src/components/ui/StatusBarTargetUrl.js
@@ -0,0 +1,42 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react';
4import classnames from 'classnames';
5
6@observer
7export default class StatusBarTargetUrl extends Component {
8 static propTypes = {
9 // eslint-disable-next-line
10 className: PropTypes.string,
11 position: PropTypes.string,
12 text: PropTypes.string,
13 };
14
15 static defaultProps = {
16 className: '',
17 position: 'bottom',
18 text: '',
19 };
20
21 render() {
22 const {
23 className,
24 position,
25 text,
26 } = this.props;
27
28 return (
29 <div
30 className={classnames({
31 'status-bar-target-url': true,
32 [`status-bar-target-url--${position}`]: true,
33 [`${className}`]: true,
34 })}
35 >
36 <div className="status-bar-target-url__content">
37 {text}
38 </div>
39 </div>
40 );
41 }
42}