discourse/app/assets/javascripts/wizard/addon/components/styling-preview.hbs
David Taylor 1506017767
DEV: Refactor wizard preview components to use inheritence (#20282)
The previous `createPreviewComponent` implementation was problematic for template colocation. We can achieve the same result using normal component class inheritance.
2023-02-14 14:20:15 +00:00

30 lines
797 B
Handlebars

<div class="previews {{if this.draggingActive 'dragging'}}">
<div class="wizard-container__preview topic-preview">
<canvas
width={{this.elementWidth}}
height={{this.elementHeight}}
style={{this.canvasStyle}}
>
</canvas>
</div>
<div class="wizard-container__preview homepage-preview">
<HomepagePreview @wizard={{this.wizard}} @step={{this.step}} />
</div>
</div>
<div class="preview-nav">
<a
href
class="preview-nav-button {{if this.previewTopic 'active'}}"
{{on "click" this.setPreviewTopic}}
>
{{i18n "wizard.previews.topic_preview"}}
</a>
<a
href
class="preview-nav-button {{unless this.previewTopic 'active'}}"
{{on "click" this.setPreviewHomepage}}
>
{{i18n "wizard.previews.homepage_preview"}}
</a>
</div>