How to use the react-feather.AlertCircle function in react-feather

To help you get started, we’ve selected a few react-feather examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bobf / skep / app / files / js / node.jsx View on Github external
const { tooltip: messages } = Messages.node;
    const now = Date.now();
    const since = (now - tstamp) / 1000
    const rows = [
      messages.lastUpdated(since),
      messages.hostname(this.hostname()),
      messages.version(this.version()),
      messages.containers(this.containers()),
    ];
    const classes = ['light'];
    let icon;
    const tooltip = `<div class="tooltip-inner align-left info-tooltip">${rows.join('<br>')}</div>`


    if (since &gt; Skep.thresholds.global.timeout.danger) {
      icon = Icon.AlertCircle;
      classes.push('error');
    } else if (since &gt; Skep.thresholds.global.timeout.warning) {
      icon = Icon.AlertCircle;
      classes.push('warning');
    } else {
      icon = Icon.Power;
    }

    const props = {
      className: classes.join(' '),
      size: '1em',
      'data-original-title': tooltip,
      'data-html': 'true',
      'data-toggle': 'tooltip',
   };