How to use the @blueprintjs/core.Intent.SUCCESS 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 ProofSuite / amp-client / src / components / SelectMenu / IndicatorSelect.js View on Github external
// @flow
import React from 'react';
import { MenuItem, Intent } from '@blueprintjs/core';
import { MultiSelect } from '@blueprintjs/select';

const INTENTS = [Intent.NONE, Intent.PRIMARY, Intent.SUCCESS, Intent.DANGER, Intent.WARNING];

type Indicator = {
  name: string,
  active: boolean,
  height: number,
  rank: number,
};

type Props = {
  indicators: Array,
  onUpdateIndicators: (Indicator, boolean) => void,
};
type State = {
  indicators: Array,
};
github jauhararifin / ugrade / frontend / src / scenes / SignIn / SignInForm / SignInFormView.tsx View on Github external
<div>Remember Me</div>
        <div>
          </div>
      
      <button fill="{true}" disabled="{isSubmitting}" type="submit">
        {isSubmitting ? 'Signing In...' : 'Sign In'}
      </button>
    
  
)
github jauhararifin / ugrade / ui / src / scenes / Dashboard / Members / PermissionForm / PermissionFormView.tsx View on Github external
{ch.map(perm =&gt; {
                const checked = values.permissions.includes(perm)
                const disabled = !updatablePermissions.includes(perm)
                return (
                  
                    
                  
                )
              })}
            
          ))}
        
      
      <div>
        <button type="submit" disabled="{isSubmitting}">
          {isSubmitting ? `Saving...` : `Save`}
        </button>
      </div>
    
  )
}
github stitchfix / flotilla-os / ui / src / components / TemplateExecutionForm.tsx View on Github external
onSuccess={(data: Run) => {
        Toaster.show({
          message: `Run ${data.run_id} submitted successfully!`,
          intent: Intent.SUCCESS,
        })
        history.push(`/runs/${data.run_id}`)
      }}
      onFailure={() => {
github HiDeoo / YaTA / src / components / PollEditor.tsx View on Github external
const values = this.getOptionsValues(options)

    if (options.length &gt; 0) {
      if (values.length &lt; 2) {
        optionsIntent = Intent.DANGER
        optionsError = 'You need at least 2 options.'
      } else if (values.length &gt; 30) {
        optionsIntent = Intent.DANGER
        optionsError = 'You need at most 30 options.'
      } else {
        optionsIntent = Intent.SUCCESS
      }
    }

    if (optionsIntent === Intent.SUCCESS &amp;&amp; question.length &gt; 0) {
      formState = FormState.Valid
    }

    return { optionsError, optionsIntent, questionIntent, formState }
  }
github vinz243 / cassette / src / client / assets / javascripts / features / app / notifications.js View on Github external
socket.listen('scanner::scanfinished::*', function (evt) {
    toaster.dismiss(toast);
    toaster.show({
      message: evt.clean ? 'No changes since last scan'
        : 'Library scan successfully finished',
      iconName: 'tick',
      intent: Intent.SUCCESS,
      timeout: 3500
    });
  })
}
github akshaykmr / oorja / app / imports / ui / components / room / Spotlight / tabs / Info / index.js View on Github external
onCopy() {
    this.setState({ copied: true });
    SupremeToaster.show({
      message: (
        <div>Link Copied to Clipboard 👍 <br> Share it to invite others to this room </div>
      ),
      intent: Intent.SUCCESS,
    });
  }
github pubpub / pubpub / client / containers / DashboardOverview / ContentRow.js View on Github external
{isCollection &amp;&amp; (
						<div>
							
							{content.pubs.length}
						</div>
					)}
					<div>
						
						{collectionConversations}
					</div>
					<div>
						
						{collectionMerges}
						{Math.random() &lt; 0.3 &amp;&amp; (
							
								{collectionReviews}
							
						)}
					</div>
					<div>
						
						{collectionReviews}
						{Math.random() &lt; 0.3 &amp;&amp; (
							
								{collectionReviews}
							
						)}
					</div>
				
			
			{isCollection &amp;&amp; collectionIsOpen &amp;&amp; (
github apache / druid / web-console / src / components / show-log / show-log.tsx View on Github external
onClick={() => {
                copy(logValue ? logValue : '', { format: 'text/plain' });
                AppToaster.show({
                  message: 'Log copied to clipboard',
                  intent: Intent.SUCCESS,
                });
              }}
            />
github cashapp / misk-web / packages / @misk / core / src / utilities / http.ts View on Github external
import { Intent } from "@blueprintjs/core"
import { HTTPMethod } from "http-method-enum"

export const HTTPMethodIntent: { [method in HTTPMethod]: Intent } = {
  [HTTPMethod.CONNECT]: Intent.DANGER,
  [HTTPMethod.DELETE]: Intent.DANGER,
  [HTTPMethod.GET]: Intent.PRIMARY,
  [HTTPMethod.HEAD]: Intent.WARNING,
  [HTTPMethod.OPTIONS]: Intent.NONE,
  [HTTPMethod.PATCH]: Intent.SUCCESS,
  [HTTPMethod.POST]: Intent.SUCCESS,
  [HTTPMethod.PUT]: Intent.SUCCESS,
  [HTTPMethod.TRACE]: Intent.NONE
}

export const HTTPStatusCodeIntent = (code: number) =&gt; {
  if (200 &lt;= code &amp;&amp; code &lt; 300) {
    return Intent.SUCCESS
  } else if (300 &lt;= code &amp;&amp; code &lt; 400) {
    return Intent.PRIMARY
  } else if (400 &lt;= code &amp;&amp; code &lt; 500) {
    return Intent.WARNING
  } else if (500 &lt;= code &amp;&amp; code &lt; 600) {
    return Intent.DANGER
  } else {
    return Intent.NONE
  }
}