31 lines
745 B
TypeScript
31 lines
745 B
TypeScript
|
import "@kernelui/core/lib/style.css";
|
||
|
|
||
|
import React from "react";
|
||
|
import {createRoot} from "react-dom/client";
|
||
|
import {DemoApp} from "./DemoApp";
|
||
|
import {createBrowserRouter} from "react-router-dom";
|
||
|
import {Avocado} from "@phosphor-icons/react";
|
||
|
import {ApplicationError, Kernel} from "@kernelui/core";
|
||
|
|
||
|
// Router initialization.
|
||
|
const router = createBrowserRouter([
|
||
|
{
|
||
|
path: "/",
|
||
|
element: <DemoApp />,
|
||
|
errorElement: <ApplicationError />,
|
||
|
}
|
||
|
])
|
||
|
|
||
|
document.addEventListener("DOMContentLoaded", () => {
|
||
|
const demoApp = document.getElementById("demo-app");
|
||
|
|
||
|
const root = createRoot(demoApp);
|
||
|
|
||
|
root.render(<Kernel router={router} footer={
|
||
|
<footer>
|
||
|
<Avocado weight={"duotone"} size={32} />
|
||
|
<div>Kernel</div>
|
||
|
</footer>
|
||
|
} />);
|
||
|
});
|