Package Exports
- iframe-resizer-react
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (iframe-resizer-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
iframe-resizer-react
This library is the offical React interface for iframe-resizer.
Install
npm install --save iframe-resizer-reactUsage
import React from 'react'
import IframeResizer from 'iframe-resizer-react'
const Example = () => {
<IframeResizer
ref={ref}
src="..."
style={{ width: '1px', minWidth: '100%'}}
{iframe tag attributes}
{iframe-resizer options}
{iframe-resizer events}
/>Note: Using min-width to set the width of the iFrame, works around an issue in iOS that can prevent the iFrame from sizing correctly.
API Documentation
All IFrame-Resizer parent page options and events can be directly passed as props to the <IframeResizer/> compontent. A subset of the methods are exported via ref.
License
MIT © davidjbradshaw