diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-10-22 22:27:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-22 22:27:13 +0200 |
commit | a0cec4d5bc92fb90429523c28e5d3426040a8723 (patch) | |
tree | 8c6caeb6ba06743fbeb1a531a963eeda3fd85828 /src/components/ui | |
parent | Merge branch 'develop' of github.com:meetfranz/franz into develop (diff) | |
parent | Merge branch 'develop' into showUrlOnLinkHover (diff) | |
download | ferdium-app-a0cec4d5bc92fb90429523c28e5d3426040a8723.tar.gz ferdium-app-a0cec4d5bc92fb90429523c28e5d3426040a8723.tar.zst ferdium-app-a0cec4d5bc92fb90429523c28e5d3426040a8723.zip |
Merge pull request #56 from GustavoKatel/showUrlOnLinkHover
Show url when mouse enters a link
Diffstat (limited to 'src/components/ui')
-rw-r--r-- | src/components/ui/StatusBarTargetUrl.js | 42 |
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 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { observer } from 'mobx-react'; | ||
4 | import classnames from 'classnames'; | ||
5 | |||
6 | @observer | ||
7 | export 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 | } | ||