Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/iframe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Iframe: ComponentType<IIframe>
frameBorder, ariaHidden, sandbox, allow,
className, title, ariaLabel, ariaLabelledby,
name, target, loading, importance, referrerpolicy,
allowpaymentrequest, src
allowpaymentrequest, src, children
}: IIframe) => {

const defaultProps = objectAssign({
Expand Down Expand Up @@ -70,7 +70,9 @@ const Iframe: ComponentType<IIframe>
props.style.border = frameBorder
}
}
return <iframe {...props}/>
return <iframe {...props}>
{children}
</iframe>

}

Expand Down
3 changes: 3 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from "react"

export interface IIframe {
url: string,
src?: string,
Expand Down Expand Up @@ -27,4 +29,5 @@ export interface IIframe {
allow?: string,
className?: string,
title?: string
children?: React.ReactNode,
}