0.2.2 • Published 6 years ago

react-sandbox-frame v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

React Sandbox Frame

npm version License Dependency Status devDependency Status npm

this package create an customizable and declarative iframe

usage

import React, { Component } from 'react'
import Frame from 'react-sandbox-frame'

export class WebView extends Component {

  /**
   * connect frame and you component
   * @param {HTMLElement} document
   */
  onLoad (document) {
    console.log(document) // output <p>hello world</p>
  }

  render () {
    return (
      <Frame onLoad={this.onLoad.bind(this)}>
        <p>hello world</p>
      </Frame>
    )
  }

}

Optional Props

The Frame component takes a couple of props that you can use to customize its behaviour:

  • children [?element]
  • onLoad [?function]
  • src [?string]
  • style [?object]
  • title [?string=page-wrapper]
  • stylesheets [?Array<String>=[]]
  • scripts [?Array<String>=[]]
0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.18

7 years ago

0.0.18-0

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago