refactor: Context-based theme provider with animated Typewriter toggle
- Convert theme to SolidJS Context/Provider pattern (ThemeProvider) - Extract createThemeState() for testability without context - Add Typewriter component with character-by-character reveal - Animate ThemeToggle with Typewriter label and hover scale - Add cursor CSS animations (typewriter-blink, cursor-typing, cursor-block) - Fix background color transition by using 'all' on :root - Rename theme.ts -> theme.tsx for JSX support - All 26 theme tests passing
This commit is contained in:
@@ -2,13 +2,13 @@ import { MetaProvider, Title } from "@solidjs/meta";
|
||||
import { Router } from "@solidjs/router";
|
||||
import { FileRoutes } from "@solidjs/start/router";
|
||||
import { Suspense } from "solid-js";
|
||||
import { useTheme } from "./lib/theme";
|
||||
import { ThemeProvider } from "./lib/theme";
|
||||
import { AppShell } from "./components/layout";
|
||||
import "./app.css";
|
||||
|
||||
export default function App() {
|
||||
useTheme();
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<Router
|
||||
root={(props) => (
|
||||
<AppShell>
|
||||
@@ -18,5 +18,6 @@ export default function App() {
|
||||
>
|
||||
<FileRoutes />
|
||||
</Router>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user