Skip to content

Commit

Permalink
Fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
JosueRhea committed Aug 9, 2023
1 parent 6de037a commit 76aab89
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Dark and light mode with SSR
### Installation

```bash
pnpm i remix-themes
pnpm i @remix/themes
#or
npm i remix-themes
npm i @remix/themes
```

### Usage
Expand All @@ -17,7 +17,7 @@ Firt create `app/theme.server.ts` to setup the session storage
// app/theme.server.ts

import { createCookieSessionStorage } from "@remix-run/node";
import { Theme, isTheme } from "remix-themes";
import { Theme, isTheme } from "@remix/themes";

const themeStorage = createCookieSessionStorage({
cookie: {
Expand Down Expand Up @@ -52,7 +52,7 @@ Update the `app/root.tsx` file. You'll ned a extra component that look like this
```tsx
// app/root.tsx
import type { LinksFunction, LoaderArgs, SerializeFrom } from "@remix-run/node";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "remix-themes";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";
import stylesheet from "~/tailwind.css";
import { useLoaderData } from "@remix-run/react";
Expand Down Expand Up @@ -104,7 +104,7 @@ Create a new route in `app/routes/action.set-theme.tsx` that will contain the ac
// app/routes/action.set-theme.tsx

import { json, type ActionFunction, redirect } from "@remix-run/node";
import { isTheme } from "remix-themes";
import { isTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";

export const action: ActionFunction = async ({ request }) => {
Expand Down Expand Up @@ -136,7 +136,7 @@ Now you can use the hook to see your current theme or change the theme.

```tsx
// app/routes/_index.tsx
import { Theme, Themed, useTheme } from "remix-themes";
import { Theme, Themed, useTheme } from "@remix/themes";

export default function Page() {
const [theme, setTheme] = useTheme();
Expand Down
2 changes: 1 addition & 1 deletion examples/www/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
### Patch Changes

- Updated dependencies [759c548]
- remix-themes@1.0.0
- @remix/themes@1.0.0
2 changes: 1 addition & 1 deletion examples/www/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
ScrollRestoration,
useLoaderData,
} from "@remix-run/react";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "remix-themes";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";
import stylesheet from "~/tailwind.css";

Expand Down
3 changes: 1 addition & 2 deletions examples/www/app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { V2_MetaFunction } from "@remix-run/node";
import { Theme, Themed, useTheme } from "remix-themes";
// import { Theme, useTheme } from "remix-themes";
import { Theme, Themed, useTheme } from "@remix/themes";

export const meta: V2_MetaFunction = () => {
return [
Expand Down
2 changes: 1 addition & 1 deletion examples/www/app/routes/action.set-theme.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { json, type ActionFunction, redirect } from "@remix-run/node";
import { isTheme } from "remix-themes";
import { isTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";

export const action: ActionFunction = async ({ request }) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/www/app/theme.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createCookieSessionStorage } from "@remix-run/node";
import { Theme, isTheme } from "remix-themes";
import { Theme, isTheme } from "@remix/themes";

const themeStorage = createCookieSessionStorage({
cookie: {
Expand Down
2 changes: 1 addition & 1 deletion packages/themes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# remix-themes
# @remix/themes

## 1.0.0

Expand Down
12 changes: 6 additions & 6 deletions packages/themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Dark and light mode with SSR
### Installation

```bash
pnpm i remix-themes
pnpm i @remix/themes
#or
npm i remix-themes
npm i @remix/themes
```

### Usage
Expand All @@ -17,7 +17,7 @@ Firt create `app/theme.server.ts` to setup the session storage
// app/theme.server.ts

import { createCookieSessionStorage } from "@remix-run/node";
import { Theme, isTheme } from "remix-themes";
import { Theme, isTheme } from "@remix/themes";

const themeStorage = createCookieSessionStorage({
cookie: {
Expand Down Expand Up @@ -52,7 +52,7 @@ Update the `app/root.tsx` file. You'll ned a extra component that look like this
```tsx
// app/root.tsx
import type { LinksFunction, LoaderArgs, SerializeFrom } from "@remix-run/node";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "remix-themes";
import { NonFlashOfWrongThemeEls, ThemeProvider, useTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";
import stylesheet from "~/tailwind.css";
import { useLoaderData } from "@remix-run/react";
Expand Down Expand Up @@ -104,7 +104,7 @@ Create a new route in `app/routes/action.set-theme.tsx` that will contain the ac
// app/routes/action.set-theme.tsx

import { json, type ActionFunction, redirect } from "@remix-run/node";
import { isTheme } from "remix-themes";
import { isTheme } from "@remix/themes";
import { getThemeSession } from "~/theme.server";

export const action: ActionFunction = async ({ request }) => {
Expand Down Expand Up @@ -136,7 +136,7 @@ Now you can use the hook to see your current theme or change the theme.

```tsx
// app/routes/_index.tsx
import { Theme, Themed, useTheme } from "remix-themes";
import { Theme, Themed, useTheme } from "@remix/themes";

export default function Page() {
const [theme, setTheme] = useTheme();
Expand Down

0 comments on commit 76aab89

Please sign in to comment.