mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-21 07:21:17 -04:00
update component prop types to use JSX.IntrinsicElements
This commit is contained in:
@@ -6,12 +6,12 @@ import type { ImageProps as NextImageProps } from "next/image";
|
||||
|
||||
import styles from "./Figure.module.css";
|
||||
|
||||
type Props = Omit<NextImageProps, "alt"> &
|
||||
type FigureProps = Omit<NextImageProps, "alt"> &
|
||||
PropsWithChildren<{
|
||||
alt?: string; // becomes optional -- pulled from plaintext-ified caption if missing
|
||||
}>;
|
||||
|
||||
const Figure = ({ children, alt, className, ...imageProps }: Props) => {
|
||||
const Figure = ({ children, alt, className, ...imageProps }: FigureProps) => {
|
||||
return (
|
||||
<figure className={classNames(styles.figure, className)}>
|
||||
<Image alt={alt || innerText(children)} {...imageProps} />
|
||||
|
Reference in New Issue
Block a user