diff --git a/README.md b/README.md index 6b8b129..4eafd44 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,11 @@ ember install:addon ember-confirm-extension {{#confirm-extension questionText='Do you really want to destroy the planet?' confirmText='Yes' declineText='No' confirmAction='destroyEarth'}} {{/confirm-extension}} + + +{{#confirm-extension questionText='Do you really want to destroy the planet?' explanationText="be careful you might get dirty" confirmText='Yes' declineText='No' confirmAction='destroyEarth'}} + +{{/confirm-extension}} ``` ## Styling diff --git a/addon/templates/components/confirm-extension.hbs b/addon/templates/components/confirm-extension.hbs index e156ddc..4b1de29 100644 --- a/addon/templates/components/confirm-extension.hbs +++ b/addon/templates/components/confirm-extension.hbs @@ -2,6 +2,9 @@ {{#if confirmMode}}
{{questionText}}
+ {{#if explanationText}} +
{{explanationText}}
+ {{/if}}
diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs index fda4f68..d52bc52 100644 --- a/tests/dummy/app/templates/application.hbs +++ b/tests/dummy/app/templates/application.hbs @@ -13,3 +13,10 @@ {{/confirm-extension}} THIS IS DANGEROUS!

I'm positive. This power should not be abused

+ +

Simple Styles With Added Explanation Text

+
+ {{#confirm-extension questionText='Do you really want to destroy our home planet?' confirmText='sure!' explanationText='ATTENTION! THIS IS DANGEROUS!' declineText='no' confirmAction='boom'}} + + {{/confirm-extension}} +