Secret Field
Digite, salve e limpe um segredo, como uma chave de API, com status definido / não definido.
Disponível em
Angular: disponível Vue: disponível React: disponível React Native: ainda não disponível
Uso
API key Not set
Stored in the system keychain and never logged.
Workspace token Not set
The keychain refused the write. Try again.
<div class="demo-stack" style="max-width: 28rem">
<sone-secret-field
label="API key"
placeholder="Paste your API key"
help="Stored in the system keychain and never logged."
clearable
[hasKey]="hasKey()"
[busy]="busy()"
(save)="save($event)"
(clear)="hasKey.set(false)"
/>
<sone-secret-field
label="Workspace token"
placeholder="tok_…"
setLabel="Token set ✓"
saveLabel="Save"
[hasKey]="false"
error="The keychain refused the write. Try again."
/>
</div>Importação
import {
SoneSecretFieldComponent,
} from "@surface-one/angular/secret-field";Referência da API
SoneSecretFieldComponentComponente
| Nome | Tipo | Padrão |
|---|---|---|
hasKey | boolean | null | null |
busy | boolean | false |
error | string | null | null |
label | — | $localize`Status` |
placeholder | string | "" |
ariaLabel | string | null | null |
help | string | null | null |
setLabel | — | $localize`Key set ✓` |
unsetLabel | — | $localize`Not set` |
saveLabel | — | $localize`Save key` |
autocomplete | string | "off" |
clearable | boolean | false |
| Nome | Tipo |
|---|---|
saveThe parent must not log or store this outside the Keychain. | string |
clear | void |