11 lines
253 B
JavaScript
11 lines
253 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
|
|
export default class extends Controller {
|
|
static targets = [ "input" ]
|
|
|
|
insertEmoji(event) {
|
|
const emojiChar = event.target.getAttribute("data-emoji")
|
|
this.inputTarget.value = emojiChar
|
|
}
|
|
}
|