-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
theme color changes accordign to the app
- Loading branch information
1 parent
933b96f
commit ad3b49a
Showing
6 changed files
with
92 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
"use client" | ||
"use client"; | ||
import { store } from "@/state/store"; | ||
import { Provider } from 'react-redux' | ||
import { Provider } from "react-redux"; | ||
import { ThemeProvider } from "next-themes"; | ||
import { useSetupAuthEvents } from "@/hooks/auth"; | ||
|
||
export default function ClientLayout({ children }) { | ||
return ( | ||
<Provider store={store}> | ||
<ThemeProvider | ||
attribute="class" | ||
defaultTheme="system" | ||
enableSystem | ||
attribute={"class"} | ||
themes={["blue-theme", "red-theme"]} | ||
defaultTheme={"blue-theme"} | ||
enableSystem={false} | ||
disableTransitionOnChange | ||
enableColorScheme | ||
> | ||
<AuthLayout children={children} /> | ||
</ThemeProvider> | ||
</Provider> | ||
) | ||
); | ||
} | ||
|
||
// separate component here because auth setup needs to be within the store | ||
export function AuthLayout({ children }) { | ||
useSetupAuthEvents() | ||
useSetupAuthEvents(); | ||
return ( | ||
<main className="items-center"> | ||
<div className=""> | ||
{children} | ||
</div> | ||
<div className="">{children}</div> | ||
</main> | ||
|
||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import * as React from "react" | ||
import * as React from "react"; | ||
|
||
import { cn } from "@/lib/utils" | ||
import { cn } from "@/lib/utils"; | ||
|
||
export interface InputProps | ||
extends React.InputHTMLAttributes<HTMLInputElement> { } | ||
extends React.InputHTMLAttributes<HTMLInputElement> {} | ||
|
||
const Input = React.forwardRef<HTMLInputElement, InputProps>( | ||
({ className, type, ...props }, ref) => { | ||
return ( | ||
<input | ||
type={type} | ||
className={cn( | ||
"flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-slate-950 placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:ring-offset-slate-950 dark:file:text-slate-50 dark:placeholder:text-slate-400 dark:focus-visible:ring-slate-300", | ||
"flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-slate-950 placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:ring-offset-slate-950 dark:file:text-slate-50 dark:placeholder:text-slate-400 dark:focus-visible:ring-slate-300 text-black", | ||
className | ||
)} | ||
ref={ref} | ||
{...props} | ||
/> | ||
) | ||
); | ||
} | ||
) | ||
Input.displayName = "Input" | ||
); | ||
Input.displayName = "Input"; | ||
|
||
export { Input } | ||
export { Input }; |