Repository URL to install this package:
Version:
0.9.6 ▾
|
import React from 'react'
import { StyledIFrame } from './styled'
import { IframeProps } from './typings'
class IFrame extends React.PureComponent<IframeProps> {
static defaultProps = {
src: '',
layout: 'responsive',
sandbox: 'allow-scripts allow-same-origin allow-popups',
frameBorder: '0',
width: '70%',
height: '500px',
}
render() {
const { width, height, ...remainingProps } = this.props
const wrapperProps = { width, height }
return (
<StyledIFrame {...wrapperProps}>
<iframe {...remainingProps} />
</StyledIFrame>
)
}
}
export { IFrame }
export default IFrame