22 lines
649 B
JavaScript
22 lines
649 B
JavaScript
![]() |
import { Component, triggerEventOnly } from '../_util/simply';
|
||
|
import { ModalFunctionalProps } from './props';
|
||
|
Component(ModalFunctionalProps, {
|
||
|
onClose: function () {
|
||
|
triggerEventOnly(this, 'close');
|
||
|
},
|
||
|
onMaskClose: function () {
|
||
|
if (this.props.maskClosable) {
|
||
|
triggerEventOnly(this, 'close');
|
||
|
}
|
||
|
},
|
||
|
onPrimaryButtonTap: function () {
|
||
|
triggerEventOnly(this, 'primaryButtonTap');
|
||
|
},
|
||
|
onSecondaryButtonTap: function () {
|
||
|
triggerEventOnly(this, 'secondaryButtonTap');
|
||
|
},
|
||
|
onCancelButtonTap: function () {
|
||
|
triggerEventOnly(this, 'cancelButtonTap');
|
||
|
},
|
||
|
});
|