feat: reveal password toggle for login form
addresses #869cqrw6w
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
export default class extends Controller {
|
||||
|
||||
static targets = [ 'field' ]
|
||||
|
||||
toggle() {
|
||||
let type = this.fieldTarget.getAttribute('type') === 'password' ? 'text' : 'password'
|
||||
this.fieldTarget.setAttribute('type', type)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user