Skip to content

Instantly share code, notes, and snippets.

@kristianfreeman
Created September 4, 2014 21:47
Show Gist options
  • Save kristianfreeman/a984ab38a12cbb263db9 to your computer and use it in GitHub Desktop.
Save kristianfreeman/a984ab38a12cbb263db9 to your computer and use it in GitHub Desktop.
confirmable
{{#if confirming}}
<button class="btn btn-danger" {{action 'confirm'}}>Are you sure?</button>
{{else}}
<button class="btn btn-primary" {{action 'startConfirming'}}>{{text}}</button>
{{/if}}
<script type="text/x-handlebars" data-template-name="index">
<h3>status: {{status}}</h3>
{{#unless hacked}}
<div>{{app-confirmable text="Hack mainframe?" action="hack"}}</div>
{{/unless}}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment