introduce solid.js
This commit is contained in:
parent
0014f75a22
commit
e2354fb9ce
10 changed files with 675 additions and 15 deletions
|
|
@ -1,8 +0,0 @@
|
|||
body {
|
||||
font-family:
|
||||
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
|
||||
sans-serif;
|
||||
margin: auto;
|
||||
max-width: 38rem;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
* ```
|
||||
*/
|
||||
|
||||
import './index.scss';
|
||||
import { startApp } from './ui';
|
||||
import { Versions } from './versions';
|
||||
|
||||
declare const versions: Versions; // preload
|
||||
|
|
@ -44,3 +44,4 @@ func().then(x => {
|
|||
console.log("is this working? ", x);
|
||||
});
|
||||
|
||||
startApp();
|
||||
|
|
|
|||
3
src/ui/index.scss
Normal file
3
src/ui/index.scss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@use "@picocss/pico/scss/pico";
|
||||
|
||||
// Custom styling goes here
|
||||
15
src/ui/index.tsx
Normal file
15
src/ui/index.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { render } from 'solid-js/web';
|
||||
import './index.scss';
|
||||
import App from './SolidHi';
|
||||
|
||||
export function startApp() {
|
||||
const root = document.getElementById('app');
|
||||
|
||||
if (root && !(root instanceof HTMLDivElement)) {
|
||||
throw new Error('Root element not found');
|
||||
}
|
||||
|
||||
render(() => (
|
||||
<App />
|
||||
), root!);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue