本文整理匯總了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
);
};