3.1.0 • Published 3 years ago

rfc-iframe v3.1.0

Weekly downloads
29
License
MIT
Repository
github
Last release
3 years ago

rfc-iframe

Version Total Downloads License

This is a react iframe wrapper. You can easily integrate external or internal style and scripts with this plugin. This plugin supports goober out of the box.

Installation

npm install rfc-iframe --save

or

yarn add rfc-iframe

Usage

import {IFrame} from 'rfc-iframe';

const WhatEver = () => {
    
    return (
        <div>
            <IFrame
                goober = {false} // default True
                frameAttributes = {{width: "100%", ...}}
                skipInterval = {false} // default True
                loadTdFonts = true // default True
                mobileSupportEnabled = {false} // default True
                enabledLatencyForSafari = {false} // default True
                enabledLatencyForMozilla = {false} // default True
                externalStyleLinks = ["https://yourextercsslink.com"] // default []
                externalScripts = ["https://yourexterscriptlink.com"] // default []
            >
                <p>Your Beautiful Website</p>            
            </IFrame>        
        </div>
    );
}

Props

  • goober (optional) - this plugin supports goober out of the box. If you dont want this feature then set the value to false. (default boolean)
  • frameAttributes (optional) - specify dom attributes for iframe. (default {})
  • loadTdFonts (optional) - Thrivedesk Specific
  • skipInterval (optional) - you can include any external css or css from you own domain. You have to pass the links as an array. (default [])
  • externalStyleLinks (optional) - you can include any external css or css from you own domain. You have to pass the links as an array. (default [])
  • externalScripts (optional) - you can include any external scripts or scripts from you own domain. You have to pass them as an array. (default [])
  • mobileSupportEnabled (optional) - this solves the issue regarding browser on iphone. Keep it false if it causes any issues (default true)
  • enabledLatencyForSafari (optional) - you can skip the initial latency for safari with this set to false. (default true)
  • enabledLatencyForMozilla (optional) - you can skip the initial latency for mozilla with this set to false. (default true)

Changelog

V3 is very light weight. We have removed support for styled component and brought goober as a replacement.

Thanks

Thank you for checking this our.

iFrame can be complex at times, mostly when you what to work with external style or scripts. I hope this will help with that problem. If you want to contribute to this project send a pull request.

Inspiration Taken From My Good Friend i-rocky.

3.1.0

3 years ago

3.0.9

3 years ago

3.0.8

3 years ago

3.0.7

3 years ago

3.0.6

3 years ago

3.0.5

3 years ago

3.0.4

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.1

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.1.0

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago