1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:01:19 -04:00

custom <Link /> wrapper around next/link

This commit is contained in:
2022-01-30 10:33:40 -05:00
parent 2a29d713bb
commit 9f34cec930
35 changed files with 578 additions and 1009 deletions

View File

@@ -1,16 +1,16 @@
import Image from "../Image/Image";
import innerText from "react-innertext";
import classNames from "classnames";
import type { ReactNode } from "react";
import type { PropsWithChildren } from "react";
import type { ImageProps as NextImageProps } from "next/image";
import styles from "./Figure.module.css";
type Props = Omit<NextImageProps, "alt"> & {
children: ReactNode;
alt?: string; // becomes optional -- pulled from plaintext-ified caption if missing
className?: string;
};
type Props = Omit<NextImageProps, "alt"> &
PropsWithChildren<{
alt?: string; // becomes optional -- pulled from plaintext-ified caption if missing
className?: string;
}>;
const Figure = ({ children, alt, className, ...imageProps }: Props) => {
return (