Socket
Socket
Sign inDemoInstall

browserwall

Package Overview
Dependencies
9
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browserwall

A small, fast and rich-API browser/platform/engine detector for React.js.


Version published
0
Maintainers
1
Install size
52.8 kB
Created
Weekly downloads
 

Readme

Source

NPM Version NPM Downloads Massachusetts Institute of Technology (MIT) Donate

React Browser Wall Component

This component is based on bowser so <BrowserWall /> property settings are defined here. <BrowserWallExit /> will render a default Browser not supported DOM but you can define your own children and provide a side entrance link.

Installation

npm i browserwall --save

Example 1

import {BrowserWall, BrowserWallExit} from 'browserwall'

const supportedBrowserTree = {
	chrome: '>86',
	firefox: '>80',
	edge: '>86'
}
const result = (
	<ErrorBoundary>
		<BrowserWall {...supportedBrowserTree}>
			<div className="App" valid="true">
				{this.state.user ? null : <Redirect to={`/login${redirectUri}`}></Redirect>}
				{this.renderApplicationCore()}
				<ToastContainer />
			</div>
			<BrowserWallExit />
		</BrowserWall>
	</ErrorBoundary>
)

Example 2

import {BrowserWall, BrowserWallExit} from 'browserwall'

const supportedBrowserTree = {
	chrome: '>86',
	firefox: '>80',
	edge: '>86'
}
const result = (
	<ErrorBoundary>
		<BrowserWall {...supportedBrowserTree} isValidBrowser={this.state.isValidBrowser}>
			<div className="App" valid="true">
				{this.state.user ? null : <Redirect to={`/login${redirectUri}`}></Redirect>}
				{this.renderApplicationCore()}
				<ToastContainer />
			</div>
			<BrowserWallExit>:O( <a href="#side-entrance" onClick={this.onSideEntranceClick.bind(this)}>I feel adventurous. I want to go in anyway.</a></BrowserWallExit>
		</BrowserWall>
	</ErrorBoundary>
)

Keywords

FAQs

Last updated on 18 Sep 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc