Add an App component.

This commit is contained in:
Tom Alexander 2024-01-22 19:41:07 -05:00
parent 0d0a99c73b
commit f777e4a856
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
5 changed files with 27 additions and 5 deletions

7
src/App.module.css Normal file
View File

@ -0,0 +1,7 @@
.App {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}

1
src/App.module.css.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export const App: string;

13
src/App.tsx Normal file
View File

@ -0,0 +1,13 @@
import React from "react";
import Editor from "./Editor";
import styles from "./App.module.css";
function App({}) {
return (
<div className={styles.App}>
<Editor />
</div>
);
}
export default App;

View File

@ -3,14 +3,13 @@ import ReactDOM from "react-dom";
import init, {
parse_org,
} from "../../organic/target/wasm32-unknown-unknown/js/wasm";
import Editor from "./Editor";
import App from "./App";
init().then(() => {
console.log(parse_org("foo"));
ReactDOM.render(
<>
<h1>Hello, world!</h1>
<Editor />
<App />
</>,
document.getElementById("root"),
);

View File

@ -4,9 +4,11 @@ const path = require("path");
const CSSModuleLoader = {
loader: "css-loader",
options: {
modules: true,
importLoaders: 2,
sourceMap: true,
modules: {
localIdentName: '[name]_[local]_[hash:base64:5]',
}
},
};