Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit b592035

Browse files
authored
fix: button to allow props like target (#272)
1 parent dde830e commit b592035

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/Button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import Link from "next/link";
22
import classNames from "@/utils/classNames";
33

4-
export default function Button({ url, type = "primary", children }) {
4+
export default function Button({ url, type = "primary", children, ...props }) {
55
return (
66
<Link
77
href={url}
8+
{...props}
89
className={classNames(
910
"inline-flex items-center gap-x-2 rounded-md px-3.5 py-2.5 text-sm font-semibold shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2",
1011
type === "primary" &&

src/components/Heading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function Heading({ title, actions = [], extras = [] }) {
2828
<div className="mt-5 flex lg:ml-4 lg:mt-0">
2929
{actions.map((action) => (
3030
<span className="sm:ml-3" key={action.icon}>
31-
<Button url={action.url}>
31+
<Button url={action.url} target="_blank">
3232
<action.icon
3333
aria-hidden="true"
3434
className="-ml-0.5 mr-1.5 h-5 w-5"

0 commit comments

Comments
 (0)