How to use the st/events.trigger function in st

To help you get started, we’ve selected a few st 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 leafo / sightreading.training / static / js / components / song_editor.es6 View on Github external
onClick={e => {
          trigger(this, "showLightbox",
            )
        }}
        type="button" className="outline">More...
github leafo / sightreading.training / static / js / components / lightbox.es6 View on Github external
close() {
    if (!this.canClose()) { return }
    trigger(this, "lightboxClosed")
    if (this.props.onClose) {
      this.props.onClose(this)
    }
  }
github leafo / sightreading.training / static / js / components / pages / sight_reading_page.es6 View on Github external
openStatsLightbox() {
    trigger(this, "showLightbox",
       this.setState({stats: new NoteStats()})}
        stats={this.state.stats} />)
  }
github leafo / sightreading.training / static / js / components / sight_reading / settings_panel.es6 View on Github external
savePreset(e) {
    e.preventDefault()
    trigger(this, "saveGeneratorPreset", this.refs.presetForm)
  }
github leafo / sightreading.training / static / js / components / pages / play_along_page.es6 View on Github external
    this.setMinChordSpacing = (value) => trigger(this, "setMinChordSpacing", value)
    this.setAutochordsRate = (value) => trigger(this, "setAutochordsRate", value)
github leafo / sightreading.training / static / js / components / pages / play_along_page.es6 View on Github external
    this.setAutochordsRate = (value) => trigger(this, "setAutochordsRate", value)
  }
github leafo / sightreading.training / static / js / components / pages / play_along_page.es6 View on Github external
        onClick={(e) => trigger(this, "setAutochords", idx)}
        className={classNames("toggle_option", {