Skip to content

Commit

Permalink
Update examples to use nthul-lite with full tree shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Feb 28, 2024
1 parent a8294a4 commit ede6fff
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NextJsSSGThemeSwitcher } from "nextjs-themes/server/nextjs";
import { ServerTarget } from "nthul-lite/server";
import { Inter } from "next/font/google";
import { SharedRootLayout } from "shared-ui";

Expand All @@ -8,7 +8,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }):
return (
<html lang="en">
<body>
<NextJsSSGThemeSwitcher />
<ServerTarget />
<SharedRootLayout className={inter.className}>{children}</SharedRootLayout>
</body>
</html>
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@mayank1513/fork-me": "^2.0.1",
"next": "^14.1.0",
"nextjs-themes": "^2.1.2",
"nthul-lite": "^0.1.0",
"r18gs": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@remix-run/react": "^2.7.2",
"@remix-run/serve": "^2.7.2",
"isbot": "5.1.0",
"nextjs-themes": "^2.1.2",
"nthul-lite": "^0.1.0",
"r18gs": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@mayank1513/fork-me": "^2.0.1",
"nextjs-themes": "^2.1.2",
"nthul-lite": "^0.1.0",
"r18gs": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 0 additions & 2 deletions lib/r18gs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ I have built wonderful libraries utilizing React18 features using Zustand. They

Thus, I decided to create a bare minimum, ultra-light store that creates shared state even while importing components from separate files for better treeshaking.

> Will be using this library soon to fix issues with `nextjs-themes`.
## Features

✅ Full TypeScript Support
Expand Down
4 changes: 2 additions & 2 deletions packages/shared-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"@types/react-dom": "^18.2.19",
"eslint-config-custom": "workspace:*",
"next": "^14.1.0",
"nextjs-themes": "^2.1.2",
"r18gs": "workspace:*",
"react": "^18.2.0",
"tsconfig": "workspace:*",
"typescript": "5.3.3"
},
"dependencies": {
"eslint": "^8.57.0"
"eslint": "^8.57.0",
"nthul-lite": "^0.1.0"
}
}
4 changes: 2 additions & 2 deletions packages/shared-ui/src/root-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "./globals.css";
import "nextjs-themes/styles.css";
import { ThemeSwitcher } from "nextjs-themes";
import "nthul-lite/styles.css";
import { ThemeSwitcher } from "nthul-lite/client/theme-switcher";
import { ForkMe } from "@mayank1513/fork-me/server"; // todo: import directory not supported in remix
import type { HTMLProps } from "react";
import styles from "./root-layout.module.css";
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-ui/src/root/description.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ColorSwitch } from "nextjs-themes";
import { ColorSwitch } from "nthul-lite/client/color-switch";
import { Logo } from "../common/logo";
import styles from "../root-layout.module.css";

Expand Down

0 comments on commit ede6fff

Please sign in to comment.