Extract Tag controller

This commit is contained in:
Yassine Guedidi
2025-03-08 03:04:16 +01:00
parent 1fd861078d
commit e438b5e63f
4 changed files with 28 additions and 27 deletions

View File

@ -0,0 +1,12 @@
import { Controller } from '@hotwired/stimulus';
export default class extends Controller {
static targets = ['link', 'edit', 'form', 'input'];
showForm() {
this.formTarget.classList.remove('hidden');
this.editTarget.classList.add('hidden');
this.linkTarget.classList.add('hidden');
this.inputTarget.focus();
}
}