Skip to content

Commit f6279a0

Browse files
committed
docs: update next-themes & remix-themes example
1 parent ccbcb01 commit f6279a0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

website/app/routes/dark-mode.mdx

+10-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ This page shows examples of how to use [`next-themes` (Next.js)](https://github.
2929

3030
'use client';
3131

32-
import { ToastProvider, type ToastProviderProperties } from '@pheralb/toast';
32+
import {
33+
ToastProvider,
34+
type ToastTheme,
35+
type ToastProviderProperties,
36+
} from '@pheralb/toast';
37+
3338
import { useTheme } from 'next-themes';
3439

3540
const ToastClientProvider = (props: ToastProviderProperties) => {
3641
const { theme } = useTheme();
3742
return (
38-
<ToastProvider theme={theme === 'dark' ? 'dark' : 'light'} {...props}>
43+
<ToastProvider toastFont="font-sans" theme={theme as ToastTheme} {...props}>
3944
{props.children}
4045
</ToastProvider>
4146
);
@@ -80,12 +85,14 @@ Import the `useTheme` hook from `remix-themes` and change the theme value:
8085
```tsx
8186
// 📄 app/root.tsx
8287

88+
import clsx from 'clsx';
89+
import { ToastProvider } from '@pheralb/toast';
8390
import { useTheme } from 'remix-themes';
8491

8592
function App() {
8693
const [theme] = useTheme();
8794
return (
88-
<html lang="en" className={cn(theme)}>
95+
<html lang="en" className={clsx(theme)}>
8996
<head>
9097
<meta charSet="utf-8" />
9198
<meta name="viewport" content="width=device-width, initial-scale=1" />

0 commit comments

Comments
 (0)