@ta-interaktiv/react-autofit-iframe
TypeScript icon, indicating that this package has built-in type declarations

3.0.3 • Public • Published

Autofit iFrame Component

Use DataWrapper charts in React standalones.

Installation

yarn add @ta-interaktiv/react-autofit-iframe

Usage

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.

Documentation

Can be found here.

Package Sidebar

Install

npm i @ta-interaktiv/react-autofit-iframe

Weekly Downloads

25

Version

3.0.3

License

ISC

Unpacked Size

75.3 kB

Total Files

14

Last publish

Collaborators

  • s1co
  • dariush-mehdiaraghi
  • mrdz_tx
  • mathiaslutz
  • sebaa