scaffold Vike app with Bati

This commit is contained in:
Bati
2025-06-26 21:42:05 -04:00
commit 9916e95de0
38 changed files with 1023 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Counter } from "./Counter.js";
export default function Page() {
return (
<>
<h1 css={{ fontWeight: "700", fontSize: "1.875rem", paddingBottom: "1rem" }}>My Vike app</h1>
This page is:
<ul>
<li>Rendered to HTML.</li>
<li>
Interactive. <Counter />
</li>
</ul>
</>
);
}
+25
View File
@@ -0,0 +1,25 @@
import { useState } from "react";
export function Counter() {
const [count, setCount] = useState(0);
return (
<button
type="button"
css={{
display: "inline-block",
border: "1px solid black",
borderRadius: "0.25rem",
backgroundColor: "#e5e7eb",
padding: "4px 8px 4px 8px",
fontSize: "0.75rem",
fontWeight: "500",
textTransform: "uppercase",
lineHeight: "1.5",
}}
onClick={() => setCount((count) => count + 1)}
>
Counter {count}
</button>
);
}