Skip to content

Repository files navigation

NPM VersionNPM DownloadsMassachusetts 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'constsupportedBrowserTree={chrome: '>86',firefox: '>80',edge: '>86'}constresult=(<ErrorBoundary><BrowserWall{...supportedBrowserTree}><divclassName="App"valid="true">{this.state.user ? null : <Redirectto={`/login${redirectUri}`}></Redirect>}{this.renderApplicationCore()}<ToastContainer/></div><BrowserWallExit/></BrowserWall></ErrorBoundary>)

Example 2

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

About

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

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages