aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/StatusBarTargetUrl.js
blob: 3e0c98c5da13b587297327faacfe8b82bb5753fa (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
import { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import classnames from 'classnames';

import Appear from './effects/Appear';

// Should this file be converted into the coding style similar to './toggle/index.tsx'?
class StatusBarTargetUrl extends Component {
  static propTypes = {
    className: PropTypes.string,
    text: PropTypes.string,
  };

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

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

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

export default observer(StatusBarTargetUrl);