mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
* enable input component * add more stars * update css comments * Update ui/app/styles/helper-classes/flexbox-and-grid.scss * make attrOptions optional * add subtext to textfile * add docLink arg to form field textfile * update form field test * add test * add comment * update jsdoc * remove unused class * Update ui/tests/integration/components/enable-input-test.js Co-authored-by: Jordan Reimer <zofskeez@gmail.com> --------- Co-authored-by: Jordan Reimer <zofskeez@gmail.com>
27 lines
625 B
Handlebars
27 lines
625 B
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
~}}
|
|
|
|
{{#if this.enable}}
|
|
{{yield}}
|
|
{{else}}
|
|
<div class="flex" ...attributes>
|
|
<div class="is-flex-grow-1">
|
|
{{#if @attr}}
|
|
<ReadonlyFormField @attr={{@attr}} @value="**********" />
|
|
{{else}}
|
|
<Input disabled class="input" @type="text" @value="**********" />
|
|
{{/if}}
|
|
</div>
|
|
<div class="align-self-end">
|
|
<Hds::Button
|
|
@text="Enable input"
|
|
@icon="edit"
|
|
@isIconOnly={{true}}
|
|
@color="tertiary"
|
|
{{on "click" (fn (mut this.enable))}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{/if}} |