本文整理汇总了TypeScript中@ephox/alloy.ModalDialog.parts方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ModalDialog.parts方法的具体用法?TypeScript ModalDialog.parts怎么用?TypeScript ModalDialog.parts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/alloy.ModalDialog
的用法示例。
在下文中一共展示了ModalDialog.parts方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
const pFooter = (buttons: AlloySpec[]) => ModalDialog.parts().footer({
dom: {
tag: 'div',
classes: [ 'tox-dialog__footer' ]
},
components: buttons,
});
示例2: renderTitle
const renderModalHeader = (foo: WindowHeaderFoo, providersBackstage: UiFactoryBackstageProviders): AlloySpec => {
const pTitle = ModalDialog.parts().title(
renderTitle(foo, Option.none(), providersBackstage)
);
const pHandle = ModalDialog.parts().draghandle({
dom: DomFactory.fromHtml('<div class="tox-dialog__draghandle"></div>')
});
const pClose = ModalDialog.parts().close(
renderClose(providersBackstage)
);
const components = [ pTitle ].concat(foo.draggable ? [ pHandle ] : []).concat([ pClose ]);
return Container.sketch({
dom: DomFactory.fromHtml('<div class="tox-dialog__header"></div>'),
components
});
};
示例3:
const renderIframeBody = (spec: Types.UrlDialog.UrlDialog) => {
const bodySpec = {
dom: {
tag: 'div',
classes: [ 'tox-dialog__content-js' ]
},
components: [
{
dom: {
tag: 'div',
classes: [ 'tox-dialog__body-iframe' ]
},
components: [
NavigableObject.craft({
dom: {
tag: 'iframe',
attributes: {
src: spec.url
}
},
behaviours: Behaviour.derive([
Tabstopping.config({ }),
Focusing.config({ })
])
})
]
}
],
behaviours: Behaviour.derive([
Keying.config({
mode: 'acyclic',
useTabstopAt: Fun.not(NavigableObject.isPseudoStop)
})
])
};
return ModalDialog.parts().body(
bodySpec
);
};
示例4: renderFooter
const renderModalFooter = (initFoo: WindowFooterFoo, providersBackstage: UiFactoryBackstageProviders) => {
return ModalDialog.parts().footer(
renderFooter(initFoo, providersBackstage)
);
};
示例5: renderBody
const renderModalBody = (foo: WindowBodyFoo, backstage: UiFactoryBackstage) => {
const bodySpec = renderBody(foo, Option.none(), backstage, false);
return ModalDialog.parts().body(
bodySpec
);
};