Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/brunocarvalhodearaujo/react-sandbox-frame

react customizable and declarative iframe
https://github.com/brunocarvalhodearaujo/react-sandbox-frame

customize frame iframe react

Last synced: 2 months ago
JSON representation

react customizable and declarative iframe

Awesome Lists containing this project

README

        

React Sandbox Frame
===================

[![npm version](https://badge.fury.io/js/react-sandbox-frame.svg)](http://badge.fury.io/js/react-sandbox-frame)
[![License](https://img.shields.io/npm/l/react-sandbox-frame.svg)](https://www.npmjs.com/package/react-sandbox-frame)
[![Dependency Status](https://david-dm.org/brunocarvalhodearaujo/react-sandbox-frame.svg?style=flat-square)](https://david-dm.org/brunocarvalhodearaujo/react-sandbox-frame)
[![devDependency Status](https://david-dm.org/brunocarvalhodearaujo/react-sandbox-frame/dev-status.svg?style=flat-square)](https://david-dm.org/brunocarvalhodearaujo/react-sandbox-frame#info=devDependencies)
[![npm](https://img.shields.io/npm/dt/react-sandbox-frame.svg)](https://github.com/brunocarvalhodearaujo/react-sandbox-frame)

this package create an customizable and declarative iframe

## usage

``````js
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

hello world


}

render () {
return (

hello world



)
}

}
``````

## 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=[]]`
- `scripts [?Array=[]]`