vault/ui/app/components/auth/fields.ts
Vault Automation 0c6c13dd38
license: update headers to IBM Corp. (#10229) (#10233)
* license: update headers to IBM Corp.
* `make proto`
* update offset because source file changed

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2025-10-21 15:20:20 -06:00

22 lines
568 B
TypeScript

/**
* Copyright IBM Corp. 2016, 2025
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
interface Args {
loginFields: Field[];
}
interface Field {
name: string; // sets input name
label?: string; // label will be "name" capitalized unless label exists
helperText?: string;
}
export default class AuthFields extends Component<Args> {
// token or password should render as "password" types, otherwise render text inputs
setInputType = (field: string) => (['token', 'password'].includes(field) ? 'password' : 'text');
}