open-nomad/ui/app/components/secure-variable-form/input-group.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
380 B
JavaScript
Raw Normal View History

// @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;
}
}