render()

in frontend/mx/src/components/dashboard-gauge.js [85:121]


  render() {
    const {
      className,
      color,
      icon: Icon,
      label,
      title,
      dialRotation,
      dialValue,
      isTemperature,
      infoText,
    } = this.props;
    const { isInfoTextVisible } = this.state;
    const classes = `dashboard-gauge ${className}`;
    const infoTextClass = 'info' + (isInfoTextVisible ? ' is-visible' : '');

    return (
      <Styled className={classes} color={color}>
        <span className={infoTextClass} style={{ borderColor: color }}>
          {infoText}
        </span>
        <div className="header">
          <Icon />
          <h3>{title}</h3>
        </div>
        <RoundGauge
          color={color}
          dialRotation={dialRotation}
          dialValue={dialValue}
          label={label}
          isTemperature={isTemperature}
          onValueMouseEnter={this.showInfoText}
          onValueMouseLeave={this.hideInfoText}
        />
      </Styled>
    );
  }