Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/measuredco/auto-frame-component
An iframe component that automatically syncs styles from the host.
https://github.com/measuredco/auto-frame-component
Last synced: 4 days ago
JSON representation
An iframe component that automatically syncs styles from the host.
- Host: GitHub
- URL: https://github.com/measuredco/auto-frame-component
- Owner: measuredco
- Created: 2024-02-27T10:43:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T15:28:31.000Z (2 months ago)
- Last Synced: 2024-11-03T08:06:43.237Z (12 days ago)
- Language: TypeScript
- Homepage:
- Size: 293 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# auto-frame-component
An iframe component that automatically syncs styles from the host.
An implementation of [react-frame-component](https://github.com/ryanseddon/react-frame-component).
## Quick start
```sh
npm i @measured/auto-frame-component
``````jsx
import AutoFrame from "@measured/auto-frame-component";export function Page() {
return (
{/* Hero class exists on parent */}
Hello, world
);
}
```## API
Shares an API with [react-frame-component](https://github.com/ryanseddon/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](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#stylesheet_load_events)
## License
MIT © [Measured Corporation Ltd](https://measured.co)