Open etoscn opened 4 years ago
I forked the react-nodegui example and I added the plugin here: https://github.com/dimitarnestorov/react-nodegui-starter
Here are all the changes:
https://github.com/dimitarnestorov/react-nodegui-starter/commit/12f8c71f9a3215628464ba91a324f4e2ec479f77
@dimitarnestorov you seem to have deleted the repository with the example; any chance you can throw it in a gist or add it as a comment here?
A little futzing, and I found a working solution:
import { hot, Window, Text } from "@nodegui/react-nodegui";
import React from "react";
import { setTitleBarStyle } from "@nodegui/plugin-title-bar";
class App extends React.Component {
constructor(props) {
super(props);
this.window = React.createRef();
}
componentDidMount() {
try {
setTitleBarStyle(this.window.current.native, 'hiddenInset');
} catch(err) {
console.error(err);
}
}
render() {
return (
<Window windowTitle="Hello 👋🏽" ref={this.window}>
<Text>Hello</Text>
</Window>
);
}
}
export default hot(App);
for react-nodegui? help