本文整理汇总了TypeScript中main/reactors/make-upload-button.makeUploadButton函数的典型用法代码示例。如果您正苦于以下问题:TypeScript makeUploadButton函数的具体用法?TypeScript makeUploadButton怎么用?TypeScript makeUploadButton使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeUploadButton函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: map
bigButtons: map(uploads, upload => {
const spec: IModalButtonSpec = {
...makeUploadButton(upload, { showSize: false }),
action: actions.queueGameUpdate({ update }),
};
return spec;
}),
示例2: map
bigButtons: map(uploads, (candidate, index) => {
return {
...makeUploadButton(candidate),
action: modalWidgets.pickUpload.action({
pickedUploadIndex: index,
}),
};
}),
示例3: map
bigButtons: map(update.choices, choice => {
const spec: ModalButtonSpec = {
...makeUploadButton(choice.upload, { showSize: false }),
action: actions.queueGameUpdate({ update, choice }),
};
spec.tags.push({
icon: choice.confidence > 0.5 ? "like" : "neutral",
label: ` ${(choice.confidence * 100).toFixed()}%`,
});
return spec;
}),