admin管理员组文章数量:1402953
I'm having an issue with with react and typescript while building an electron app. I'm trying to set up custom-electron-titlebar with my app. For the most part its working fine. However, i have run into webstorm telling me...
TS2353: Object literal may only specify known properties, and removeMenuBar does not exist in type TitleBarOption
When i look at the code sure enough there is no "removeMenuBar" on the interface. I assume this was removed for some reason or another but the docs was never updated. Can someone help explain to me how i can remove the menu bar from the titlebar? I have searched and searched and come up empty handed.
import { Titlebar, TitlebarColor } from "custom-electron-titlebar";
window.addEventListener("DOMContentLoaded", () => {
new Titlebar({
backgroundColor: TitlebarColor.fromHex("#000000"),
titleHorizontalAlignment: "center",
menuTransparency: 100,
removeMenuBar: true,
});
});
I'm having an issue with with react and typescript while building an electron app. I'm trying to set up custom-electron-titlebar with my app. For the most part its working fine. However, i have run into webstorm telling me...
TS2353: Object literal may only specify known properties, and removeMenuBar does not exist in type TitleBarOption
When i look at the code sure enough there is no "removeMenuBar" on the interface. I assume this was removed for some reason or another but the docs was never updated. Can someone help explain to me how i can remove the menu bar from the titlebar? I have searched and searched and come up empty handed.
import { Titlebar, TitlebarColor } from "custom-electron-titlebar";
window.addEventListener("DOMContentLoaded", () => {
new Titlebar({
backgroundColor: TitlebarColor.fromHex("#000000"),
titleHorizontalAlignment: "center",
menuTransparency: 100,
removeMenuBar: true,
});
});
Share
Improve this question
edited Mar 28 at 13:04
jam j
6241 gold badge2 silver badges19 bronze badges
asked Mar 23 at 4:58
Chris WilliamsonChris Williamson
812 silver badges9 bronze badges
1 Answer
Reset to default 0The library custom-electron-titlebar
is archived, meaning it's not longer maintained. The README
is up to date, but not the latest version of the library published on npm. The latter was published on Jan 15 2024, while the functionality you want (added via this PR) has been merged on May 11 2024.
If you still want to use this library anyway, you need to install it from github directly:
npm install "https://github/AlexTorresDev/custom-electron-titlebar.git#main" --save
More details on this question.
Note that because the library uses pnpm, if you use Yarn Berry, then you won't be able to do that because of this issue (or this one).
本文标签: reactjsCustomElectronTitlebar removeMenuBar typescript issueStack Overflow
版权声明:本文标题:reactjs - Custom-Electron-Titlebar removeMenuBar typescript issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744296901a2599386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论