You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@measured/auto-frame-component

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@measured/auto-frame-component

An iframe component that automatically syncs styles from the host.

0.1.7
latest
Source
npmnpm
Version published
Weekly downloads
249
-3.49%
Maintainers
3
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 17 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts