mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 20:51:10 +00:00
53a61349e1
Fixes an issue where the code editor would not resizing to the full extent of the browser window plus CodeEditor restyling/refactoring - :label named block - :tools named block - :content named block - code and CSS cleanup - CodeEditor.mdx Signed-off-by: Alessandro De Blasis <alex@deblasis.net> Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
29 lines
940 B
Handlebars
29 lines
940 B
Handlebars
<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>
|
|
<CopyButton @value={{value}} @name="value" />
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<IvyCodemirror @value={{value}} @name={{name}} @class={{class}} @options={{options}} @valueUpdated={{action onkeyup}} />
|
|
<pre><code>{{#if (has-block "content")}}{{yield to="content"}}{{else}}{{value}}{{/if}}</code></pre>
|