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