mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
init with tailwind
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import 'tailwindcss/tailwind.css';
|
||||
export default function App() {
|
||||
return (
|
||||
<div className="bg-red-300 text-center">
|
||||
coucou
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="script-src 'self' 'unsafe-inline'"
|
||||
/>
|
||||
<title>Hello Electron React!</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App';
|
||||
|
||||
const container = document.getElementById('root')!;
|
||||
const root = createRoot(container);
|
||||
root.render(<App />);
|
||||
|
||||
// calling IPC exposed from preload script
|
||||
window.electron.ipcRenderer.once('ipc-example', (arg) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(arg);
|
||||
});
|
||||
window.electron.ipcRenderer.sendMessage('ipc-example', ['ping']);
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
import { Channels } from 'main/preload';
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
electron: {
|
||||
ipcRenderer: {
|
||||
sendMessage(channel: Channels, args: unknown[]): void;
|
||||
on(
|
||||
channel: string,
|
||||
func: (...args: unknown[]) => void
|
||||
): (() => void) | undefined;
|
||||
once(channel: string, func: (...args: unknown[]) => void): void;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user