summaryrefslogtreecommitdiffstats
path: root/src/components/ui/StatusBarTargetUrl.js
blob: 1c8dce0f7dae6215d5cf1c99f5a001e60ad05745 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import classnames from 'classnames';

@observer
export default class StatusBarTargetUrl extends Component {
  static propTypes = {
    // eslint-disable-next-line
    className: PropTypes.string,
    position: PropTypes.string,
    text: PropTypes.string,
  };

  static defaultProps = {
    className: '',
    position: 'bottom',
    text: '',
  };

  render() {
    const {
      className,
      position,
      text,
    } = this.props;

    return (
      <div
        className={classnames({
          'status-bar-target-url': true,
          [`status-bar-target-url--${position}`]: true,
          [`${className}`]: true,
        })}
      >
        <div className="status-bar-target-url__content">
          {text}
        </div>
      </div>
    );
  }
}