@ta-interaktiv/react-autofit-iframe
v3.0.5
Published
Iframe component that adapts to content height
Readme
Autofit iFrame Component
Use DataWrapper charts in React standalones.
Installation
yarn add @ta-interaktiv/react-autofit-iframeUsage
import React from 'react'
import { AutofitIFrame } from '@ta-interaktiv/react-autofit-iframe'
export function YourComponent() {
return (
<div>
<AutofitIFrame src='https://datawrapper.dwcdn.net/vyp2p/2/' />
</div>
)
}The AutofitIFrame component supports all attributes of a normal iframe
element, but automatically sets some of them per default.
With DataWrapper
See the example above. It's best to remove any width, height, and style
attributes, so that they won't interfere with Autofit doing its magic.
