2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
}}
|
|
|
|
|
2021-11-12 15:28:06 +00:00
|
|
|
<div class="toolbar-container">
|
|
|
|
<div class="toolbar">
|
|
|
|
<label class="title">
|
|
|
|
{{#if (has-block "label")}}
|
|
|
|
{{yield to="label"}}
|
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
<div class="tools">
|
|
|
|
{{#if (has-block "tools")}}
|
|
|
|
{{yield to="tools"}}
|
|
|
|
{{else}}
|
|
|
|
{{#if (and (not readonly) (not syntax))}}
|
|
|
|
<PowerSelect
|
|
|
|
@onChange={{action "change"}}
|
|
|
|
@selected={{mode}}
|
|
|
|
@searchEnabled={{false}}
|
|
|
|
@options={{modes}} as |mode|>
|
|
|
|
{{mode.name}}
|
|
|
|
</PowerSelect>
|
|
|
|
<div class="toolbar-separator"></div>
|
2021-12-06 10:33:44 +00:00
|
|
|
<CopyButton
|
|
|
|
@value={{value}}
|
|
|
|
@name="value"
|
|
|
|
/>
|
2021-11-12 15:28:06 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-06 10:33:44 +00:00
|
|
|
<IvyCodemirror
|
|
|
|
@value={{value}}
|
|
|
|
@name={{name}}
|
|
|
|
@class={{class}}
|
|
|
|
@options={{options}}
|
|
|
|
@valueUpdated={{action onkeyup}}
|
|
|
|
/>
|
2023-03-15 02:49:14 +00:00
|
|
|
<pre><code>{{#if (has-block 'content')}}{{yield to='content'}}{{else}}{{value}}{{/if}}</code></pre>
|