-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
8f738a6
commit eea01db
Showing
3 changed files
with
51 additions
and
1 deletion.
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,25 @@ | ||
"use client"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
import { Icons } from "@/components/icons"; | ||
import { usePrint } from "@/components/print-provider"; | ||
|
||
type Props = { | ||
text: string; | ||
className?: string; | ||
usage: "live" | "pdf"; | ||
}; | ||
|
||
export default function ActionButton({ text, className, usage }: Props) { | ||
const { handlePrint } = usePrint(); | ||
return usage === "live" ? ( | ||
<Button onClick={handlePrint} className={className}> | ||
{text} | ||
</Button> | ||
) : ( | ||
<Button href="/resume"> | ||
{text} | ||
<Icons.OpenLink className="h-4 w-4 stroke-zinc-400 transition group-active:stroke-zinc-600 dark:group-hover:stroke-zinc-50 dark:group-active:stroke-zinc-50" /> | ||
</Button> | ||
); | ||
} |
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,25 @@ | ||
"use client"; | ||
|
||
import { Button } from "@/components/ui/button"; | ||
import { Icons } from "@/components/icons"; | ||
import { usePrint } from "@/components/print-provider"; | ||
|
||
type Props = { | ||
text: string; | ||
className?: string; | ||
usage: "live" | "pdf"; | ||
}; | ||
|
||
export default function ActionButton({ text, className, usage }: Props) { | ||
const { handlePrint } = usePrint(); | ||
return usage === "live" ? ( | ||
<Button onClick={handlePrint} className={className}> | ||
{text} | ||
</Button> | ||
) : ( | ||
<Button href="/"> | ||
{text} | ||
<Icons.OpenLink className="h-4 w-4 stroke-zinc-400 transition group-active:stroke-zinc-600 dark:group-hover:stroke-zinc-50 dark:group-active:stroke-zinc-50" /> | ||
</Button> | ||
); | ||
} |
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