I have the following hbs snippet:
<div class='photo-viewer-control' local-class='leftbar'>
{{yield to='leftbar'}}
</div>
I am consuming the leftbar component in:
<Viewer>
<:leftbar>
<Infos
@image={{this.currentImage}}
/>
</:leftbar>
</Viewer>
I want to render the div only if leftbar
has yielded.
I already tried the following:
{{#if (has-block 'leftbar')}}
<div class='photo-viewer-control' local-class='leftbar'>
{{yield to='leftbar'}}
</div>
{{/if}}
I added the has-block
but the div is still rendering when there is no leftbar
.