Skip to content

Commit

Permalink
feat: unknown tailwindcss problem
Browse files Browse the repository at this point in the history
  • Loading branch information
beingofexistence13 committed Sep 2, 2023
1 parent 0e71553 commit 3d8bb54
Show file tree
Hide file tree
Showing 38 changed files with 15,098 additions and 396 deletions.
3 changes: 3 additions & 0 deletions apps/nextui-tailwindcss-problem/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
35 changes: 35 additions & 0 deletions apps/nextui-tailwindcss-problem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
3 changes: 3 additions & 0 deletions apps/nextui-tailwindcss-problem/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
21 changes: 21 additions & 0 deletions apps/nextui-tailwindcss-problem/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Next UI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 40 additions & 0 deletions apps/nextui-tailwindcss-problem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Next.js & NextUI Template

This is a template for creating applications using Next.js 13 (app directory) and NextUI (v2).

## Technologies Used

- [Next.js 13](https://nextjs.org/docs/getting-started)
- [NextUI v2](https://nextui.org/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Tailwind Variants](https://tailwind-variants.org)
- [TypeScript](https://www.typescriptlang.org/)
- [Framer Motion](https://www.framer.com/motion/)
- [next-themes](https://github.com/pacocoursey/next-themes)

## How to Use


### Use the template with create-next-app

To create a new project based on this template using `create-next-app`, run the following command:

```bash
npx create-next-app -e https://github.com/nextui-org/next-app-template
```

### Install dependencies

```bash
npm install
```

### Run the development server

```bash
npm run dev
```

## License

Licensed under the [MIT license](https://github.com/nextui-org/next-app-template/blob/main/LICENSE).
13 changes: 13 additions & 0 deletions apps/nextui-tailwindcss-problem/app/about/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function AboutLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
{children}
</div>
</section>
);
}
9 changes: 9 additions & 0 deletions apps/nextui-tailwindcss-problem/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { title } from "@/components/primitives";

export default function AboutPage() {
return (
<div>
<h1 className={title()}>About</h1>
</div>
);
}
13 changes: 13 additions & 0 deletions apps/nextui-tailwindcss-problem/app/blog/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function BlogLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
{children}
</div>
</section>
);
}
9 changes: 9 additions & 0 deletions apps/nextui-tailwindcss-problem/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { title } from "@/components/primitives";

export default function BlogPage() {
return (
<div>
<h1 className={title()}>Blog</h1>
</div>
);
}
13 changes: 13 additions & 0 deletions apps/nextui-tailwindcss-problem/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function DocsLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
{children}
</div>
</section>
);
}
9 changes: 9 additions & 0 deletions apps/nextui-tailwindcss-problem/app/docs/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { title } from "@/components/primitives";

export default function DocsPage() {
return (
<div>
<h1 className={title()}>Docs</h1>
</div>
);
}
30 changes: 30 additions & 0 deletions apps/nextui-tailwindcss-problem/app/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use client'

import { useEffect } from 'react'

export default function Error({
error,
reset,
}: {
error: Error
reset: () => void
}) {
useEffect(() => {
// Log the error to an error reporting service
console.error(error)
}, [error])

return (
<div>
<h2>Something went wrong!</h2>
<button
onClick={
// Attempt to recover by trying to re-render the segment
() => reset()
}
>
Try again
</button>
</div>
)
}
63 changes: 63 additions & 0 deletions apps/nextui-tailwindcss-problem/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import "@/styles/globals.css";
import { Metadata } from "next";
import { siteConfig } from "@/config/site";
import { fontSans } from "@/config/fonts";
import { Providers } from "./providers";
import { Navbar } from "@/components/navbar";
import { Link } from "@nextui-org/link";
import clsx from "clsx";

export const metadata: Metadata = {
title: {
default: siteConfig.name,
template: `%s - ${siteConfig.name}`,
},
description: siteConfig.description,
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
],
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
apple: "/apple-touch-icon.png",
},
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<body
className={clsx(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable
)}
>
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
<div className="relative flex flex-col h-screen">
<Navbar />
<main className="container mx-auto max-w-7xl pt-16 px-6 flex-grow">
{children}
</main>
<footer className="w-full flex items-center justify-center py-3">
<Link
isExternal
className="flex items-center gap-1 text-current"
href="https://nextui-docs-v2.vercel.app?utm_source=next-app-template"
title="nextui.org homepage"
>
<span className="text-default-600">Powered by</span>
<p className="text-primary">NextUI</p>
</Link>
</footer>
</div>
</Providers>
</body>
</html>
);
}
54 changes: 54 additions & 0 deletions apps/nextui-tailwindcss-problem/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import NextLink from "next/link";
import { Link } from "@nextui-org/link";
import { Snippet } from "@nextui-org/snippet";
import { Code } from "@nextui-org/code"
import { button as buttonStyles } from "@nextui-org/theme";
import { siteConfig } from "@/config/site";
import { title, subtitle } from "@/components/primitives";
import { GithubIcon } from "@/components/icons";

export default function Home() {
return (
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
<h1 className={title()}>Make&nbsp;</h1>
<h1 className={title({ color: "violet" })}>beautiful&nbsp;</h1>
<br />
<h1 className={title()}>
websites regardless of your design experience.
</h1>
<h2 className={subtitle({ class: "mt-4" })}>
Beautiful, fast and modern React UI library.
</h2>
</div>

<div className="flex gap-3">
<Link
isExternal
as={NextLink}
href={siteConfig.links.docs}
className={buttonStyles({ color: "primary", radius: "full", variant: "shadow" })}
>
Documentation
</Link>
<Link
isExternal
as={NextLink}
className={buttonStyles({ variant: "bordered", radius: "full" })}
href={siteConfig.links.github}
>
<GithubIcon size={20} />
GitHub
</Link>
</div>

<div className="mt-8">
<Snippet hideSymbol hideCopyButton variant="flat">
<span>
Get started by editing <Code color="primary">app/page.tsx</Code>
</span>
</Snippet>
</div>
</section>
);
}
13 changes: 13 additions & 0 deletions apps/nextui-tailwindcss-problem/app/pricing/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function PricingLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
{children}
</div>
</section>
);
}
9 changes: 9 additions & 0 deletions apps/nextui-tailwindcss-problem/app/pricing/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { title } from "@/components/primitives";

export default function PricingPage() {
return (
<div>
<h1 className={title()}>Pricing</h1>
</div>
);
}
19 changes: 19 additions & 0 deletions apps/nextui-tailwindcss-problem/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import * as React from "react";
import { NextUIProvider } from "@nextui-org/system";
import { ThemeProvider as NextThemesProvider } from "next-themes";
import { ThemeProviderProps } from "next-themes/dist/types";

export interface ProvidersProps {
children: React.ReactNode;
themeProps?: ThemeProviderProps;
}

export function Providers({ children, themeProps }: ProvidersProps) {
return (
<NextUIProvider>
<NextThemesProvider {...themeProps}>{children}</NextThemesProvider>
</NextUIProvider>
);
}
14 changes: 14 additions & 0 deletions apps/nextui-tailwindcss-problem/components/counter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use client";

import { useState } from "react";
import { Button } from "@nextui-org/button";

export const Counter = () => {
const [count, setCount] = useState(0);

return (
<Button radius="full" onPress={() => setCount(count + 1)}>
Count is {count}
</Button>
);
};
Loading

0 comments on commit 3d8bb54

Please sign in to comment.