1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-13 19:55:26 -04:00

enable experimental next/future/image (#973)

This commit is contained in:
2022-06-27 20:45:02 -04:00
committed by GitHub
parent a4602335a1
commit f826f59fcc
14 changed files with 183 additions and 184 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
import Link from "../Link";
import { OctocatOcticon } from "../Icons";
import { styled } from "../../lib/styles/stitches.config";
import type { ComponentProps } from "react";
const Link = styled("a", {
const GitHubLink = styled(Link, {
margin: "0 0.4em",
color: "$text",
textDecoration: "none",
"&:hover": {
color: "$link",
@@ -19,15 +19,15 @@ const Octocat = styled(OctocatOcticon, {
fill: "currentColor",
});
export type OctocatLinkProps = ComponentProps<typeof Link> & {
export type OctocatLinkProps = Omit<ComponentProps<typeof GitHubLink>, "href"> & {
repo: string;
};
const OctocatLink = ({ repo, className, ...rest }: OctocatLinkProps) => {
return (
<Link href={`https://github.com/${repo}`} target="_blank" rel="noopener noreferrer" {...rest}>
<GitHubLink href={`https://github.com/${repo}`} underline={false} {...rest}>
<Octocat className={className} />
</Link>
</GitHubLink>
);
};