Ghost-Admin/app/components/gh-task-button.hbs

14 lines
574 B
Handlebars

{{#if hasBlock}}
{{yield (hash
isIdle=this.isIdle
isRunning=this.isRunning
isSuccess=this.isSuccess
isFailure=this.isFailure
)}}
{{else}}
{{#if this.isRunning}}<span>{{svg-jar "spinner" class="gh-icon-spinner"}}{{this.runningText}}</span>{{/if}}
{{#if this.isIdle}}<span>{{this.buttonText}}</span>{{/if}}
{{#if this.isSuccess}}<span {{did-insert this.handleReset}}>{{svg-jar "check-circle"}} {{this.successText}}</span>{{/if}}
{{#if this.isFailure}}<span>{{svg-jar "retry"}} {{this.failureText}}</span>{{/if}}
{{/if}}