@measured/auto-frame-component
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

auto-frame-component

An iframe component that automatically syncs styles from the host.

An implementation of react-frame-component.

Quick start

npm i @measured/auto-frame-component
import AutoFrame from "@measured/auto-frame-component";

export function Page() {
  return (
    <AutoFrame>
      {/* Hero class exists on parent */}
      <div className="Hero">Hello, world</div>
    </AutoFrame>
  );
}

API

Shares an API with react-frame-component, and exposes some additional props.

debug

debug: boolean

Print debug messages when mounting styles to the console

onStylesLoaded

onStylesLoaded: function

A callback that triggers when the initial styles are loaded

License

MIT © Measured Corporation Ltd

Readme

Keywords

none

Package Sidebar

Install

npm i @measured/auto-frame-component

Weekly Downloads

880

Version

0.1.7

License

MIT

Unpacked Size

13.3 kB

Total Files

4

Last publish

Collaborators

  • chrisvxd
  • monospaced
  • anglepoised