mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 22:29:44 +08:00
28 lines
656 B
JavaScript
28 lines
656 B
JavaScript
(function(ionic) {
|
|
'use strict';
|
|
/**
|
|
* An ActionSheet is the slide up menu popularized on iOS.
|
|
*
|
|
* You see it all over iOS apps, where it offers a set of options
|
|
* triggered after an action.
|
|
*/
|
|
ionic.views.ActionSheet = function(opts) {
|
|
this.el = opts.el;
|
|
};
|
|
|
|
ionic.views.ActionSheet.prototype = {
|
|
show: function() {
|
|
// Force a reflow so the animation will actually run
|
|
this.el.offsetWidth;
|
|
|
|
this.el.classList.add('active');
|
|
},
|
|
hide: function() {
|
|
// Force a reflow so the animation will actually run
|
|
this.el.offsetWidth;
|
|
this.el.classList.remove('active');
|
|
}
|
|
};
|
|
|
|
})(ionic);
|