0.0.2-canary.12d46ae • Published 1 year ago
@tontile/autoframe v0.0.2-canary.12d46ae
autoframe
An iframe component that automatically syncs styles from the host.
An implementation of react-frame-component.
Quick start
npm i @tontile/autoframe
import AutoFrame from "@tontile/autoframe";
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 © TonTile Corporation Ltd
0.0.2-canary.12d46ae
1 year ago