Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button/link consistency #223

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export default function Home() {
<Link
href="https://discord.com/invite/vee94km4Wh"
target="_blank"
className={cn(buttonVariants({ variant: "outline" }))}
className={cn(buttonVariants({ variant: "outlineRounded" }))}
>
Join Community
</Link>
<Link href="/batch" className={cn(buttonVariants())}>
Join Mentorship
<Link href="/batch" className={cn(buttonVariants({ variant: "rounded" }))}>
Get Started
</Link>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions components/layout/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default function MainNav({ items, children }: MainNavProps) {
</nav>
</div>
) : null}

<button
className="flex items-center space-x-2 md:hidden"
onClick={() => setShowMobileMenu(!showMobileMenu)}
Expand Down
13 changes: 9 additions & 4 deletions components/layout/site-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import { cn } from "@/lib/utils";
import { Button } from "../ui/button";
import { Button, buttonVariants } from "../ui/button";
import Link from "next/link";

type Props = {};

Expand All @@ -25,9 +26,13 @@ export default function SiteFooter({}: Props) {
>
Learn
</a>
<a href="https://discord.com/invite/vee94km4Wh" target="_blank">
<Button className="rounded-full">Join Community</Button>
</a>
<Link
href="https://discord.com/invite/vee94km4Wh"
target="_blank"
className={`${cn(buttonVariants({ variant: "rounded" })) } md:flex md:min-w-fit`}
>
Join Community
</Link>
<a
href="/batch/build/react/fundamentals"
className={cn(
Expand Down
17 changes: 11 additions & 6 deletions components/layout/site-header.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import React from "react";
import MainNav from "./main-nav";
import { navConfig } from "@/config/nav";
import { Button } from "../ui/button";
import { Button, buttonVariants } from "../ui/button";
import { ModeToggle } from "../mode-toggle";
import Link from "next/link";
import { cn } from "@/lib/utils";

type Props = {};

Expand All @@ -12,11 +14,14 @@ export default function SiteHeader({}: Props) {
<div className="container flex h-14 items-center md:gap-6 gap-9 md:px-8 px-0">
<MainNav items={navConfig} />
<ModeToggle />
<a href="https://discord.com/invite/vee94km4Wh" target="_blank">
<Button className="hidden md:inline-block rounded-full">
Mentorship
</Button>
</a>

<Link
href="https://discord.com/invite/vee94km4Wh"
target="_blank"
className={`${cn(buttonVariants({ variant: "rounded" })) } hidden w-0 md:flex md:min-w-fit`}
>
Join Community
</Link>
</div>
</header>
);
Expand Down
8 changes: 4 additions & 4 deletions components/tracks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Tracks({}: Props) {
</div>
<Link
href="/batch/learn/html/basic"
className={cn(buttonVariants(), "rounded-full px-8 py-2 mt-4")}
className={cn(buttonVariants({ variant: "rounded" }), "px-8 py-2 mt-4")}
>
Join
</Link>
Expand All @@ -55,7 +55,7 @@ export default function Tracks({}: Props) {
</div>
<Link
href="/batch/dsa/loops"
className={cn(buttonVariants(), "rounded-full px-8 py-2 mt-4")}
className={cn(buttonVariants({ variant: "rounded" }), "px-8 py-2 mt-4")}
>
Join
</Link>
Expand All @@ -77,7 +77,7 @@ export default function Tracks({}: Props) {
</div>
<Link
href="/batch/build/react/fundamentals"
className={cn(buttonVariants(), "rounded-full px-8 py-2 mt-4")}
className={cn(buttonVariants({ variant: "rounded" }), "px-8 py-2 mt-4")}
>
Join
</Link>
Expand All @@ -99,7 +99,7 @@ export default function Tracks({}: Props) {
</div>
<Link
href="/batch/hire/hire"
className={cn(buttonVariants(), "rounded-full px-8 py-2 mt-4")}
className={cn(buttonVariants({ variant: "rounded" }), "px-8 py-2 mt-4")}
>
Join
</Link>
Expand Down
3 changes: 3 additions & 0 deletions components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ const buttonVariants = cva(
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
rounded: "bg-primary text-primary-foreground hover:bg-primary/90 rounded-full",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
outlineRounded:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground rounded-full",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
Expand Down
Loading