diff --git a/addon/components/s-modal.js b/addon/components/s-modal.js index e07146f..38f0aca 100644 --- a/addon/components/s-modal.js +++ b/addon/components/s-modal.js @@ -3,6 +3,15 @@ import layout from '../templates/components/s-modal'; export default Component.extend({ layout, - classNames: ['s-modal'] + classNames: ['s-modal'], + isVisible: true, + actions: { + onCancel() { + this.set('isVisible', false); + if (this.get('onCancelAction')) { + this.get('onCancelAction')(); + } + } + } }); diff --git a/addon/templates/components/s-modal.hbs b/addon/templates/components/s-modal.hbs index c2d2bdd..1515cbd 100644 --- a/addon/templates/components/s-modal.hbs +++ b/addon/templates/components/s-modal.hbs @@ -1,7 +1,9 @@ +