Skip to content

Commit

Permalink
Merge pull request #2 from thriqon/leftbound-extension
Browse files Browse the repository at this point in the history
Leftbound extension
  • Loading branch information
thriqon committed Apr 29, 2015
2 parents 87dab01 + 1791799 commit f45096e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
3 changes: 3 additions & 0 deletions addon/components/confirm-extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import layout from '../templates/components/confirm-extension';
export default Ember.Component.extend({
layout: layout,

tagName: 'span',
classNames: ['ece-container'],

_setupClickHandler: function () {
var closer = _clickHandlerFor(this);
this.set('_closer', closer);
Expand Down
4 changes: 2 additions & 2 deletions addon/templates/components/confirm-extension.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="ece-bubble">
<div class="ece-question">{{questionText}}</div>
<div class="ece-buttons">
<span class="ece-confirm" {{action 'confirm'}}>{{confirmText}}</span>
<span class="ece-decline" {{action 'decline'}}>{{declineText}}</span>
<button class="ece-confirm" {{action 'confirm'}}>{{confirmText}}</button>
<button class="ece-decline" {{action 'decline'}}>{{declineText}}</button>
</div>
</div>
{{/if}}
21 changes: 21 additions & 0 deletions tests/dummy/app/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

.simple-styles .ece-container {
display: inline-block;
}

.simple-styles .ece-bubble {
border: 1px solid grey;
padding: 10px;
position: absolute;
background-color: white;
}

.simple-styles .ece-confirm {
background-color: red;
padding: 8px;
font-size: 1.5em;
color: white;
border-radius: 100%;
width: 3em;
height: 3em;
}
11 changes: 10 additions & 1 deletion tests/dummy/app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@

<h1>Central Command</h1>
<h1>Unstyled</h1>

{{#confirm-extension questionText='really?' confirmText='yes' declineText='no' confirmAction='boom'}}
<button>Destroy planet earth</button>
{{/confirm-extension}}

<h1>Simple Styles</h1>

<div class="simple-styles">
ATTENTION! {{#confirm-extension questionText='Do you really want to destroy our home planet?' confirmText='sure!' declineText='no' confirmAction='boom'}}
<button>Destroy planet earth</button>
{{/confirm-extension}} THIS IS <strong>DANGEROUS</strong>!
<p>I'm positive. This power should not be abused</p>
</div>

0 comments on commit f45096e

Please sign in to comment.