🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@nicholasadamou/react-iframe

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nicholasadamou/react-iframe

_Have you ever needed to add headers to a iframe? You've come to the right place!_

0.1.1
Source
npm
Version published
Weekly downloads
188
-45.82%
Maintainers
1
Weekly downloads
 
Created
Source

React iFrame Build Status

Have you ever needed to add headers to a iframe? You've come to the right place!

Getting Started

React iFrame is a simple react component that lets you add headers to a iframe. It's super light-weight and requires no external dependencies!

Installation

You can download the package using npm with:

npm install @nicholasadamou/react-iframe --save

Usage (Simple)

To use, simply import the component and specify your src and headers:

import Iframe from "@nicholasadamou/react-iframe";

const token = localStorage.getItem("token") || new Cookies().get("token");

<Iframe
	src="/chatbot?mode=embedded"
	headers={{
		Authorization: `Bearer ${token}`,
		type: "text/html",
	}}
/>;

License

© Nicholas Adamou.

It is free software, and may be redistributed under the terms specified in the LICENSE file.

Keywords

react

FAQs

Package last updated on 21 Nov 2020

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