0.1.7 • Published 17 days ago

@measured/auto-frame-component v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

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

0.1.7

17 days ago

0.1.6

18 days ago

0.1.4

22 days ago

0.1.5

21 days ago

0.1.2

24 days ago

0.1.3

23 days ago

0.1.0

1 month ago

0.2.0

1 month ago

0.1.1

1 month ago