1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-14 13:24:25 -04:00

all components should accept additional classnames

This commit is contained in:
2022-01-20 12:06:05 -05:00
parent 2162e9d563
commit 7e37adabc1
22 changed files with 150 additions and 86 deletions

View File

@@ -1,3 +1,5 @@
import classNames from "classnames";
import styles from "./IFrame.module.css";
type Props = {
@@ -7,11 +9,12 @@ type Props = {
width?: number; // defaults to 100%
allowScripts?: boolean;
noScroll?: boolean;
className?: string;
};
const IFrame = ({ src, title, height, width, allowScripts, noScroll, ...rest }: Props) => (
const IFrame = ({ src, title, height, width, allowScripts, noScroll, className, ...rest }: Props) => (
<iframe
className={styles.frame}
className={classNames(styles.frame, className)}
src={src}
title={title}
sandbox={allowScripts ? "allow-same-origin allow-scripts allow-popups" : undefined}