vault/ui/app/components/b64-toggle.hbs
Matthew Irish 32e806f88a
[UI] - Glimmerize b64-toggle component (#31423)
* convert b64-toggle to ts and make it a glimmer component

* update usage of b64-toggle
2025-08-12 11:23:32 -05:00

17 lines
319 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<button
type="button"
class="button b64-toggle {{if @isInput 'is-input' 'is-textarea'}}"
{{on "click" this.handleClick}}
...attributes
>
{{#if this.isBase64}}
Decode from base64
{{else}}
Encode to base64
{{/if}}
</button>