forked from shadcn-ui/ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CSS variables and CLI (shadcn-ui#180)
- Loading branch information
Showing
395 changed files
with
8,873 additions
and
16,057 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "shadcn/ui" }], | ||
"changelog": ["@changesets/changelog-github", { "repo": "shadcn-ui" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
|
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,4 +1,4 @@ | ||
# ----------------------------------------------------------------------------- | ||
# App | ||
# ----------------------------------------------------------------------------- | ||
NEXT_PUBLIC_APP_URL=http://localhost:3000 | ||
NEXT_PUBLIC_APP_URL=http://localhost:3001 |
This file was deleted.
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
71 changes: 71 additions & 0 deletions
71
apps/www/app/examples/authentication/components/user-auth-form.tsx
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,71 @@ | ||
"use client" | ||
|
||
import * as React from "react" | ||
|
||
import { cn } from "@/lib/utils" | ||
import { Button } from "@/components/ui/button" | ||
import { Input } from "@/components/ui/input" | ||
import { Label } from "@/components/ui/label" | ||
import { Icons } from "@/components/icons" | ||
|
||
interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {} | ||
|
||
export function UserAuthForm({ className, ...props }: UserAuthFormProps) { | ||
const [isLoading, setIsLoading] = React.useState<boolean>(false) | ||
|
||
async function onSubmit(event: React.SyntheticEvent) { | ||
event.preventDefault() | ||
setIsLoading(true) | ||
|
||
setTimeout(() => { | ||
setIsLoading(false) | ||
}, 3000) | ||
} | ||
|
||
return ( | ||
<div className={cn("grid gap-6", className)} {...props}> | ||
<form onSubmit={onSubmit}> | ||
<div className="grid gap-2"> | ||
<div className="grid gap-1"> | ||
<Label className="sr-only" htmlFor="email"> | ||
</Label> | ||
<Input | ||
id="email" | ||
placeholder="[email protected]" | ||
type="email" | ||
autoCapitalize="none" | ||
autoComplete="email" | ||
autoCorrect="off" | ||
disabled={isLoading} | ||
/> | ||
</div> | ||
<Button disabled={isLoading}> | ||
{isLoading && ( | ||
<Icons.spinner className="mr-2 h-4 w-4 animate-spin" /> | ||
)} | ||
Sign In with Email | ||
</Button> | ||
</div> | ||
</form> | ||
<div className="relative"> | ||
<div className="absolute inset-0 flex items-center"> | ||
<span className="w-full border-t" /> | ||
</div> | ||
<div className="relative flex justify-center text-xs uppercase"> | ||
<span className="bg-white px-2 text-muted-foreground"> | ||
Or continue with | ||
</span> | ||
</div> | ||
</div> | ||
<Button variant="outline" type="button" disabled={isLoading}> | ||
{isLoading ? ( | ||
<Icons.spinner className="mr-2 h-4 w-4 animate-spin" /> | ||
) : ( | ||
<Icons.gitHub className="mr-2 h-4 w-4" /> | ||
)}{" "} | ||
Github | ||
</Button> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.