How to use the @blueprintjs/core.Intent.WARNING function in @blueprintjs/core

To help you get started, we’ve selected a few @blueprintjs/core 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 source-academy / cadet-frontend / src / components / assessment / index.tsx View on Github external
const makeGradingStatus = (gradingStatus: string) => {
  let iconName: IconName;
  let intent: Intent;
  let tooltip: string;

  switch (gradingStatus) {
    case GradingStatuses.graded:
      iconName = IconNames.TICK;
      intent = Intent.SUCCESS;
      tooltip = 'Fully graded';
      break;

    case GradingStatuses.grading:
      iconName = IconNames.TIME;
      intent = Intent.WARNING;
      tooltip = 'Grading in progress';
      break;

    case GradingStatuses.none:
      iconName = IconNames.CROSS;
      intent = Intent.DANGER;
      tooltip = 'Not graded yet';
      break;

    default:
      // Shows default icon if this assessment is ungraded
      iconName = IconNames.DISABLE;
      intent = Intent.PRIMARY;
      tooltip = `Not applicable`;
      break;
  }
github jauhararifin / ugrade / frontend / src / scenes / ContestDetail / Submissions / SubmissionsView.tsx View on Github external
renderVerdict = (verdict: SubmissionVerdict) => {
    switch (verdict) {
      case GradingVerdict.Accepted:
        return Accepted
      case GradingVerdict.WrongAnswer:
        return Wrong Answer
      case GradingVerdict.TimeLimitExceeded:
        return Time Limit Exceeded
      case GradingVerdict.MemoryLimitExceeded:
        return Memory Limit Exceeded
      case GradingVerdict.RuntimeError:
        return Runtime Error
      case GradingVerdict.CompilationError:
        return Compilation Error
      case GradingVerdict.InternalError:
        return Internal Error
      default:
        return Pending
    }
  }
github dagster-io / dagster / js_modules / dagit / src / execute / ConfigEditorModePicker.tsx View on Github external
itemPredicate={(query, mode) =>
            query.length === 0 || mode.name.includes(query)
          }
          itemRenderer={(mode, props) => (
            
          )}
          onItemSelect={this.onItemSelect}
        >
          <button disabled="{singleMode" mode="">
        
      
    );
  }
</button>
github Datawheel / canon / packages / vizbuilder / src / helpers / loadstate.js View on Github external
function getSeverityByError(error) {
  if ("response" in error) {
    return Intent.WARNING;
  }
  return Intent.DANGER;
}
github akshaykmr / oorja / app / imports / ui / components / Room / index.js View on Github external
const toastFeatureNotAvailable = () => {
      this.props.toaster.show({
        message: `Your browser does not support this feature at the moment 😕.
          You can however, share you screen with Chrome using a browser extension`,
        intent: Intent.WARNING,
      });
    };
github poooi / poi / views / components / settings / main / advanced-config / shortcut-config.es View on Github external
{t('Press the key, or Esc to cancel')}
        

        <button disabled="{disabled}">
          {value ? t('Change') : t('Set')}
        </button>

        {!disabled &amp;&amp; value &amp;&amp; !recording &amp;&amp; (
          <button>
            {t('Remove')}
          </button>
        )}
      
    )
  }
}
github poooi / poi / views / components / main / parts / construction-panel.es View on Github external
const getTagIntent = ({ isLSC }, timeRemaining) =>
  timeRemaining > 600 && isLSC
    ? Intent.DANGER
    : timeRemaining > 600
    ? Intent.PRIMARY
    : timeRemaining > 0
    ? Intent.WARNING
    : timeRemaining == 0
    ? Intent.SUCCESS
    : Intent.NONE
github dagster-io / dagster / js_modules / dagit / src / execute / SolidSelector.tsx View on Github external
{allSolidsSelected ? "All" : highlighted.length} solid
                {highlighted.length !== 1 || allSolidsSelected ? "s" : ""}{" "}
                selected
              
              <button> this.setState({ open: false })}&gt;
                Cancel
              </button>
              <button>
                Apply
              </button>
            
          
        
        <button>
          {valid &amp;&amp; this.props.pipeline
            ? subsetDescription(this.props.value, this.props.pipeline)
            : "Invalid Solid Selection"}
        </button>
      
    );
  }
}
github poooi / poi / views / components / settings / network / index.es View on Github external
)(({ proxyPort, port, allowLAN, t }) =&gt; (
  <section title="{t('Relay">
    
      
        {t('If you do not know what is this section for, leave it unconfigured')}
      
      
        
          
        
        {port === proxyPort &amp;&amp; (
          
            {t('Proxy port and poi port are the same, are you sure?')}
          </section>