-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(7/n) shadcn: improve focus-visible for all elements (#6573)
* feat: focus visible colors * fix: lint * fix: tabs
- Loading branch information
Showing
43 changed files
with
245 additions
and
256 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
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,23 +1,84 @@ | ||
import { Loader2Icon, MailOpenIcon } from "lucide-react" | ||
import { ArrowRightIcon, Loader2Icon, SendIcon } from "lucide-react" | ||
|
||
import { Button } from "@/registry/new-york-v4/ui/button" | ||
|
||
export function ButtonDemo() { | ||
return ( | ||
<div className="flex flex-col items-center gap-2 md:flex-row"> | ||
<Button>Button</Button> | ||
<Button variant="outline">Outline</Button> | ||
<Button variant="ghost">Ghost</Button> | ||
<Button variant="destructive">Destructive</Button> | ||
<Button variant="secondary">Secondary</Button> | ||
<Button variant="link">Link</Button> | ||
<Button> | ||
<MailOpenIcon /> Login with Email | ||
</Button> | ||
<Button disabled> | ||
<Loader2Icon className="animate-spin" /> | ||
Please wait | ||
</Button> | ||
<div className="flex flex-col gap-6"> | ||
<div className="flex flex-col items-center gap-2 md:flex-row"> | ||
<Button>Button</Button> | ||
<Button variant="outline">Outline</Button> | ||
<Button variant="ghost">Ghost</Button> | ||
<Button variant="destructive">Destructive</Button> | ||
<Button variant="secondary">Secondary</Button> | ||
<Button variant="link">Link</Button> | ||
<Button variant="outline"> | ||
<SendIcon /> Send | ||
</Button> | ||
<Button variant="outline"> | ||
Learn More <ArrowRightIcon /> | ||
</Button> | ||
<Button disabled variant="outline"> | ||
<Loader2Icon className="animate-spin" /> | ||
Please wait | ||
</Button> | ||
</div> | ||
<div className="flex flex-col items-center gap-2 md:flex-row"> | ||
<Button size="sm">Small</Button> | ||
<Button variant="outline" size="sm"> | ||
Outline | ||
</Button> | ||
<Button variant="ghost" size="sm"> | ||
Ghost | ||
</Button> | ||
<Button variant="destructive" size="sm"> | ||
Destructive | ||
</Button> | ||
<Button variant="secondary" size="sm"> | ||
Secondary | ||
</Button> | ||
<Button variant="link" size="sm"> | ||
Link | ||
</Button> | ||
<Button variant="outline" size="sm"> | ||
<SendIcon /> Send | ||
</Button> | ||
<Button variant="outline" size="sm"> | ||
Learn More <ArrowRightIcon /> | ||
</Button> | ||
<Button disabled size="sm" variant="outline"> | ||
<Loader2Icon className="animate-spin" /> | ||
Please wait | ||
</Button> | ||
</div> | ||
<div className="flex flex-col flex-wrap items-center gap-2 md:flex-row"> | ||
<Button size="lg">Large</Button> | ||
<Button variant="outline" size="lg"> | ||
Outline | ||
</Button> | ||
<Button variant="ghost" size="lg"> | ||
Ghost | ||
</Button> | ||
<Button variant="destructive" size="lg"> | ||
Destructive | ||
</Button> | ||
<Button variant="secondary" size="lg"> | ||
Secondary | ||
</Button> | ||
<Button variant="link" size="lg"> | ||
Link | ||
</Button> | ||
<Button variant="outline" size="lg"> | ||
<SendIcon /> Send | ||
</Button> | ||
<Button variant="outline" size="lg"> | ||
Learn More <ArrowRightIcon /> | ||
</Button> | ||
<Button disabled size="lg" variant="outline"> | ||
<Loader2Icon className="animate-spin" /> | ||
Please wait | ||
</Button> | ||
</div> | ||
</div> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client" | ||
|
||
import Link from "next/link" | ||
import { usePathname } from "next/navigation" | ||
|
||
import { | ||
NavigationMenu, | ||
NavigationMenuItem, | ||
NavigationMenuLink, | ||
NavigationMenuList, | ||
} from "@/registry/new-york-v4/ui/navigation-menu" | ||
|
||
export function NavHeader() { | ||
const pathname = usePathname() | ||
|
||
return ( | ||
<NavigationMenu> | ||
<NavigationMenuList className="gap-2 *:data-[slot=navigation-menu-item]:h-7 **:data-[slot=navigation-menu-link]:py-1 **:data-[slot=navigation-menu-link]:font-medium"> | ||
<NavigationMenuItem> | ||
<NavigationMenuLink asChild data-active={pathname === "/"}> | ||
<Link href="/">Home</Link> | ||
</NavigationMenuLink> | ||
</NavigationMenuItem> | ||
<NavigationMenuItem> | ||
<NavigationMenuLink asChild data-active={pathname === "/charts"}> | ||
<Link href="/charts">Charts</Link> | ||
</NavigationMenuLink> | ||
</NavigationMenuItem> | ||
</NavigationMenuList> | ||
</NavigationMenu> | ||
) | ||
} |
Oops, something went wrong.