set up nextui and framer motion #3

Merged
christian merged 1 commits from framer-nextui into main 2024-05-17 08:45:25 +00:00
5 changed files with 3057 additions and 144 deletions
Showing only changes of commit 3c39510aa3 - Show all commits

View File

@ -1,7 +1,7 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { SessionProvider } from "next-auth/react";
import { NextUIProvider } from "@nextui-org/system";
const inter = Inter({ subsets: ["latin"] });
@ -17,7 +17,9 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
<body className={inter.className}>
<NextUIProvider>{children}</NextUIProvider>
</body>
</html>
);
}

View File

@ -3,12 +3,13 @@
import { signIn, signOut } from "next-auth/react";
import { SyntheticEvent } from "react";
import { Session } from "next-auth";
import { Button } from "@nextui-org/button";
interface SignInProps {
session: Session | null;
}
export default async function SignIn({ session }: SignInProps) {
export default function SignIn({ session }: SignInProps) {
const handleSignIn = async (event: SyntheticEvent) => {
event.preventDefault();
await signIn("github");
@ -21,11 +22,11 @@ export default async function SignIn({ session }: SignInProps) {
return session?.user ? (
<form onSubmit={handleSignOut}>
<button type="submit">Sign out</button>
<Button type="submit">Sign out</Button>
</form>
) : (
<form onSubmit={handleSignIn}>
<button type="submit">Sign in with GitHub</button>
<Button type="submit">Sign in</Button>
</form>
);
}

3170
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,9 +10,14 @@
},
"dependencies": {
"@next/env": "^14.2.3",
"@nextui-org/button": "^2.0.31",
"@nextui-org/react": "^2.3.6",
"@nextui-org/system": "^2.1.2",
"@nextui-org/theme": "^2.2.3",
"@types/next-auth": "^3.15.0",
"@vercel/postgres": "^0.8.0",
"drizzle-orm": "^0.30.10",
"framer-motion": "^11.2.4",
"next": "14.2.3",
"next-auth": "^5.0.0-beta.18",
"react": "^18.3.1",

View File

@ -1,3 +1,4 @@
import { nextui } from "@nextui-org/theme";
import type { Config } from "tailwindcss";
const config: Config = {
@ -5,16 +6,12 @@ const config: Config = {
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@nextui-org/theme/dist/components/(button|ripple|spinner).js",
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
extend: {},
},
},
},
plugins: [],
plugins: [nextui()],
};
export default config;