mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-24 12:11:11 +01:00
* 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>
22 lines
568 B
TypeScript
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');
|
|
}
|