github.com/hernad/nomad@v1.6.112/ui/app/components/variable-form/input-group.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 // @ts-check 7 8 import { action } from '@ember/object'; 9 import Component from '@glimmer/component'; 10 import { tracked } from '@glimmer/tracking'; 11 12 export default class InputGroup extends Component { 13 @tracked isObscured = true; 14 15 get inputType() { 16 return this.isObscured ? 'password' : 'text'; 17 } 18 19 @action 20 toggleInputType() { 21 this.isObscured = !this.isObscured; 22 } 23 }