-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
436 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.js", | ||
"css": "renderer/styles/globals.css", | ||
"baseColor": "neutral", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import * as React from "react" | ||
import { Slot } from "@radix-ui/react-slot" | ||
import { cva, type VariantProps } from "class-variance-authority" | ||
|
||
import { cn } from "@/lib/utils" | ||
|
||
const buttonVariants = cva( | ||
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", | ||
{ | ||
variants: { | ||
variant: { | ||
default: "bg-primary text-primary-foreground hover:bg-primary/90", | ||
destructive: | ||
"bg-destructive text-destructive-foreground hover:bg-destructive/90", | ||
outline: | ||
"border border-input bg-background hover:bg-accent hover:text-accent-foreground", | ||
secondary: | ||
"bg-secondary text-secondary-foreground hover:bg-secondary/80", | ||
ghost: "hover:bg-accent hover:text-accent-foreground", | ||
link: "text-primary underline-offset-4 hover:underline", | ||
}, | ||
size: { | ||
default: "h-10 px-4 py-2", | ||
sm: "h-9 rounded-md px-3", | ||
lg: "h-11 rounded-md px-8", | ||
icon: "h-10 w-10", | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
size: "default", | ||
}, | ||
} | ||
) | ||
|
||
export interface ButtonProps | ||
extends React.ButtonHTMLAttributes<HTMLButtonElement>, | ||
VariantProps<typeof buttonVariants> { | ||
asChild?: boolean | ||
} | ||
|
||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( | ||
({ className, variant, size, asChild = false, ...props }, ref) => { | ||
const Comp = asChild ? Slot : "button" | ||
return ( | ||
<Comp | ||
className={cn(buttonVariants({ variant, size, className }))} | ||
ref={ref} | ||
{...props} | ||
/> | ||
) | ||
} | ||
) | ||
Button.displayName = "Button" | ||
|
||
export { Button, buttonVariants } |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { type ClassValue, clsx } from "clsx" | ||
import { twMerge } from "tailwind-merge" | ||
|
||
export function cn(...inputs: ClassValue[]) { | ||
return twMerge(clsx(inputs)) | ||
} |
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,35 +1,38 @@ | ||
import React from 'react' | ||
import Head from 'next/head' | ||
import Link from 'next/link' | ||
import Image from 'next/image' | ||
import React from "react"; | ||
import Head from "next/head"; | ||
import Link from "next/link"; | ||
import Image from "next/image"; | ||
import { buttonVariants } from "@/components/ui/button"; | ||
|
||
export default function HomePage() { | ||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>Home - Nextron (with-tailwindcss)</title> | ||
</Head> | ||
<div className="grid grid-col-1 text-2xl w-full text-center"> | ||
<div> | ||
<Image | ||
className="ml-auto mr-auto" | ||
src="/images/logo.png" | ||
alt="Logo image" | ||
width={256} | ||
height={256} | ||
/> | ||
</div> | ||
<span>⚡ Electron ⚡</span> | ||
<span>+</span> | ||
<span>Next.js</span> | ||
<span>+</span> | ||
<span>tailwindcss</span> | ||
<span>=</span> | ||
<span>💕 </span> | ||
</div> | ||
<div className="mt-1 w-full flex-wrap flex justify-center"> | ||
<Link href="/next">Go to next page</Link> | ||
</div> | ||
</React.Fragment> | ||
) | ||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>Home - Nextron (with-tailwindcss)</title> | ||
</Head> | ||
<div className="grid grid-col-1 text-2xl w-full text-center"> | ||
<div> | ||
<Image | ||
className="ml-auto mr-auto" | ||
src="/images/logo.png" | ||
alt="Logo image" | ||
width={256} | ||
height={256} | ||
/> | ||
</div> | ||
<span>⚡ Electron ⚡</span> | ||
<span>+</span> | ||
<span>Next.js</span> | ||
<span>+</span> | ||
<span>tailwindcss</span> | ||
<span>=</span> | ||
<span>💕 </span> | ||
</div> | ||
<div className="mt-1 w-full flex-wrap flex justify-center"> | ||
<Link href="/next" className={buttonVariants()}> | ||
Go to next page | ||
</Link> | ||
</div> | ||
</React.Fragment> | ||
); | ||
} |
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,29 +1,32 @@ | ||
import React from 'react' | ||
import Head from 'next/head' | ||
import Link from 'next/link' | ||
import Image from 'next/image' | ||
import React from "react"; | ||
import Head from "next/head"; | ||
import Link from "next/link"; | ||
import Image from "next/image"; | ||
import { buttonVariants } from "@/components/ui/button"; | ||
|
||
export default function NextPage() { | ||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>Next - Nextron (with-tailwindcss)</title> | ||
</Head> | ||
<div className="grid grid-col-1 text-2xl w-full text-center"> | ||
<div> | ||
<Image | ||
className="ml-auto mr-auto" | ||
src="/images/logo.png" | ||
alt="Logo image" | ||
width={256} | ||
height={256} | ||
/> | ||
</div> | ||
<span>⚡ Nextron ⚡</span> | ||
</div> | ||
<div className="mt-1 w-full flex-wrap flex justify-center"> | ||
<Link href="/home">Go to home page</Link> | ||
</div> | ||
</React.Fragment> | ||
) | ||
return ( | ||
<React.Fragment> | ||
<Head> | ||
<title>Next - Nextron (with-tailwindcss)</title> | ||
</Head> | ||
<div className="grid grid-col-1 text-2xl w-full text-center"> | ||
<div> | ||
<Image | ||
className="ml-auto mr-auto" | ||
src="/images/logo.png" | ||
alt="Logo image" | ||
width={256} | ||
height={256} | ||
/> | ||
</div> | ||
<span>⚡ Nextron ⚡</span> | ||
</div> | ||
<div className="mt-1 w-full flex-wrap flex justify-center"> | ||
<Link href="/home" className={buttonVariants()}> | ||
Go to home page | ||
</Link> | ||
</div> | ||
</React.Fragment> | ||
); | ||
} |
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,15 +1,76 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
body { | ||
@apply bg-gray-900 text-white; | ||
} | ||
} | ||
@layer base { | ||
:root { | ||
--background: 0 0% 100%; | ||
--foreground: 0 0% 3.9%; | ||
|
||
--card: 0 0% 100%; | ||
--card-foreground: 0 0% 3.9%; | ||
|
||
--popover: 0 0% 100%; | ||
--popover-foreground: 0 0% 3.9%; | ||
|
||
--primary: 0 0% 9%; | ||
--primary-foreground: 0 0% 98%; | ||
|
||
--secondary: 0 0% 96.1%; | ||
--secondary-foreground: 0 0% 9%; | ||
|
||
--muted: 0 0% 96.1%; | ||
--muted-foreground: 0 0% 45.1%; | ||
|
||
--accent: 0 0% 96.1%; | ||
--accent-foreground: 0 0% 9%; | ||
|
||
--destructive: 0 84.2% 60.2%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--border: 0 0% 89.8%; | ||
--input: 0 0% 89.8%; | ||
--ring: 0 0% 3.9%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
|
||
@layer components { | ||
.btn-blue { | ||
@apply text-white font-bold px-4 py-2 rounded bg-blue-600 hover:bg-blue-500; | ||
.dark { | ||
--background: 0 0% 3.9%; | ||
--foreground: 0 0% 98%; | ||
|
||
--card: 0 0% 3.9%; | ||
--card-foreground: 0 0% 98%; | ||
|
||
--popover: 0 0% 3.9%; | ||
--popover-foreground: 0 0% 98%; | ||
|
||
--primary: 0 0% 98%; | ||
--primary-foreground: 0 0% 9%; | ||
|
||
--secondary: 0 0% 14.9%; | ||
--secondary-foreground: 0 0% 98%; | ||
|
||
--muted: 0 0% 14.9%; | ||
--muted-foreground: 0 0% 63.9%; | ||
|
||
--accent: 0 0% 14.9%; | ||
--accent-foreground: 0 0% 98%; | ||
|
||
--destructive: 0 62.8% 30.6%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--border: 0 0% 14.9%; | ||
--input: 0 0% 14.9%; | ||
--ring: 0 0% 83.1%; | ||
} | ||
} | ||
} | ||
|
||
@layer base { | ||
* { | ||
@apply border-border; | ||
} | ||
body { | ||
@apply bg-background text-foreground; | ||
} | ||
} |
Oops, something went wrong.