Add Basecamp-style boosts
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = [ "input" ]
|
||||
|
||||
insertEmoji(event) {
|
||||
const emojiChar = event.target.getAttribute("data-emoji")
|
||||
const value = this.inputTarget.value
|
||||
this.inputTarget.value = `${value}${emojiChar}`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user