1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-12-05 13:38:57 -05:00

update component prop types to use JSX.IntrinsicElements

This commit is contained in:
2022-02-09 09:37:20 -05:00
parent f205a14bdc
commit 885f97fa64
40 changed files with 280 additions and 275 deletions

View File

@@ -1,17 +1,17 @@
import { useEffect, useRef } from "react";
import classNames from "classnames/bind";
import type { PropsWithChildren, HTMLAttributes } from "react";
import type { PropsWithChildren } from "react";
import styles from "./Wallpaper.module.css";
const cx = classNames.bind(styles);
type Props = HTMLAttributes<HTMLDivElement> &
type WallpaperProps = JSX.IntrinsicElements["div"] &
PropsWithChildren<{
image: string;
tile?: boolean;
}>;
const Wallpaper = ({ image, tile, className, ...rest }: Props) => {
const Wallpaper = ({ image, tile, className, ...rest }: WallpaperProps) => {
const bgRef = useRef<HTMLDivElement>(null);
useEffect(() => {