semantic-modal
v1.1.1
Published
a wrapper for semantic ui modal
Downloads
1
Readme
semantic-modal
a wrapper for semantic modal.
Demo
Install
sudo yarn add semantic-modal -D
or
sudo npm install semantic-modal --save
Usage
script
<script src="./dist/semantic-modal.min.js"></script>
<script>
new SemanticModal
.ModalBuilder()
.title('旧信息归档')
.content('您的收件箱已满,是否要我们启用自动归档旧邮件?')
.titleIcon('inbox')
.type(SemanticModal.ModalType.NORMAL)
.size(SemanticModal.ModalSize.SMALL)
.closeable(true)
.showCloseButton(true)
.showNegativeButton(true)
.showPositiveButton(true)
.positiveCallback(function () {
alert('you click positive button');
})
.negativeCallback(function () {
alert('you click negative button');
})
.build()
.show();
</script>
module import
import {Modal, ModalBuilder, ModalType, ModalSize, ModalAnimation} from 'semantic-modal';
new ModalBuilder()
.title('旧信息归档')
.content('您的收件箱已满,是否要我们启用自动归档旧邮件?')
.titleIcon('inbox')
.type(SemanticModal.ModalType.NORMAL)
.size(SemanticModal.ModalSize.SMALL)
.closeable(true)
.showCloseButton(true)
.showNegativeButton(true)
.showPositiveButton(true)
.positiveCallback(function () {
alert('you click positive button');
})
.negativeCallback(function () {
alert('you click negative button');
})
.build()
.show();
Maintained by
知乎 : @面条
Github : @lsxiao
License
MIT