mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-20 21:21:16 -04:00
bump next to 13.5
This commit is contained in:
@@ -1,33 +1,35 @@
|
||||
import Link from "../Link";
|
||||
import { OctocatOcticon } from "../Icons";
|
||||
import { SiGithub } from "react-icons/si";
|
||||
import { styled, theme } from "../../lib/styles/stitches.config";
|
||||
import type { ComponentPropsWithoutRef } from "react";
|
||||
|
||||
const GitHubLink = styled(Link, {
|
||||
margin: "0 0.4em",
|
||||
color: theme.colors.text,
|
||||
|
||||
"&:hover, &:focus-visible": {
|
||||
color: theme.colors.link,
|
||||
},
|
||||
});
|
||||
|
||||
const Octocat = styled(OctocatOcticon, {
|
||||
const Octocat = styled(SiGithub, {
|
||||
width: "1.2em",
|
||||
height: "1.2em",
|
||||
verticalAlign: "-0.2em",
|
||||
fill: "currentColor",
|
||||
});
|
||||
|
||||
export type OctocatLinkProps = Omit<ComponentPropsWithoutRef<typeof GitHubLink>, "href"> & {
|
||||
export type OctocatLinkProps = Omit<ComponentPropsWithoutRef<typeof Link>, "href"> & {
|
||||
repo: string;
|
||||
};
|
||||
|
||||
const OctocatLink = ({ repo, className, ...rest }: OctocatLinkProps) => {
|
||||
return (
|
||||
<GitHubLink href={`https://github.com/${repo}`} underline={false} {...rest}>
|
||||
<Link
|
||||
href={`https://github.com/${repo}`}
|
||||
underline={false}
|
||||
css={{
|
||||
margin: "0 0.4em",
|
||||
color: theme.colors.text,
|
||||
|
||||
"&:hover, &:focus-visible": {
|
||||
color: theme.colors.link,
|
||||
},
|
||||
}}
|
||||
{...rest}
|
||||
>
|
||||
<Octocat className={className} />
|
||||
</GitHubLink>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user