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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user