How to use the evergreen-ui.toaster.success function in evergreen-ui

To help you get started, we’ve selected a few evergreen-ui 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 bojand / ghz / web / ui / src / components / ReportList.jsx View on Github external
async deleteBulk () {
    const selectedIds = (Object.keys(this.state.selected)).map(v => Number.parseInt(v))
    const res = await this.props.reportStore.deleteReports(selectedIds)
    if (res && typeof res.deleted === 'number') {
      toaster.success(`Deleted ${res.deleted} reports.`)
      this.props.reportStore.fetchReports(
        this.state.ordering, this.state.sort, this.state.page, this.state.projectId)
    }
  }
github JaeYeopHan / octodirect / src / components / setting-view / DomainSetting.tsx View on Github external
private handleKeyDown({
    keyCode,
    currentTarget,
  }: React.KeyboardEvent): void {
    if (KeyUtils.isEnterKey(keyCode)) {
      const { onKeyDown } = this.props
      const { value } = currentTarget

      if (value === '') {
        return
      }
      onKeyDown(value)
      currentTarget.value = ''
      toaster.success('Success to add', { duration: 1 })
    }
  }
}