open-nomad/ui/app/components/secure-variable-form/input-group.js
Jai 48679fdf99 ui: make eye toggles only toggle on/off for their respective row (#13406)
* chore:  update tests to handle invidual toggle responsibility

* chore:  prettify secure-variable-form template

* ui:  extract input group markup into seperate component
2022-07-11 13:34:05 -04:00

19 lines
380 B
JavaScript

// @ts-check
import { action } from '@ember/object';
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
export default class InputGroup extends Component {
@tracked isObscured = true;
get inputType() {
return this.isObscured ? 'password' : 'text';
}
@action
toggleInputType() {
this.isObscured = !this.isObscured;
}
}