github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/components/variable-form/input-group.js (about) 1 // @ts-check 2 3 import { action } from '@ember/object'; 4 import Component from '@glimmer/component'; 5 import { tracked } from '@glimmer/tracking'; 6 7 export default class InputGroup extends Component { 8 @tracked isObscured = true; 9 10 get inputType() { 11 return this.isObscured ? 'password' : 'text'; 12 } 13 14 @action 15 toggleInputType() { 16 this.isObscured = !this.isObscured; 17 } 18 }