1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-29 02:55:48 -04: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,9 +1,8 @@
import classNames from "classnames";
import { HTMLAttributes } from "react";
import styles from "./IFrame.module.css";
type Props = HTMLAttributes<HTMLIFrameElement> & {
type IFrameProps = JSX.IntrinsicElements["iframe"] & {
src: string;
height: number;
width?: number; // defaults to 100%
@@ -11,7 +10,7 @@ type Props = HTMLAttributes<HTMLIFrameElement> & {
noScroll?: boolean;
};
const IFrame = ({ src, title, height, width, allowScripts, noScroll, className, ...rest }: Props) => (
const IFrame = ({ src, title, height, width, allowScripts, noScroll, className, ...rest }: IFrameProps) => (
<iframe
className={classNames(styles.frame, className)}
src={src}