1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-14 23:00:49 -05:00

trim some unnecessary dependencies

This commit is contained in:
2025-04-07 12:11:04 -04:00
parent 80793c7330
commit 53d6f57699
19 changed files with 256 additions and 300 deletions

View File

@@ -2,14 +2,13 @@ import Link from "../Link";
import { LinkIcon } from "lucide-react";
import type { ComponentPropsWithoutRef } from "react";
export type HeadingAnchorProps = Omit<ComponentPropsWithoutRef<typeof Link>, "href"> & {
export type HeadingAnchorProps = Omit<ComponentPropsWithoutRef<typeof Link>, "href" | "id"> & {
id: string;
title: string;
};
const HeadingAnchor = ({ id, title, ...rest }: HeadingAnchorProps) => {
const HeadingAnchor = ({ id, ...rest }: HeadingAnchorProps) => {
return (
<Link href={`#${id}`} title={`Jump to "${title}"`} plain {...rest}>
<Link href={`#${id}`} plain {...rest}>
<LinkIcon size="0.8em" />
</Link>
);