react-forcefield

1.0.6 • Public • Published

react-forcefield

Greenkeeper badge Coverage Status npm package version npm downloads code style: prettier

Prevent unintentional interactions(scroll, zoom, etc) until click or touch.

Documentation

Demo & Examples

Live demo: react-forcefield.coston.io

To build the examples locally, run:

npm install
npm start

Then open localhost:8080 in a browser.

Installation

The easiest way to use react-forcefield is to install it from npm and include it in your own React build process (using Browserify, Webpack, etc).

You can also use the standalone build by including dist/react-forcefield.js in your page. If you use this, make sure you have already included React, and it is available as a global variable.

npm install react-forcefield --save

Usage

To use, import Forcefield from 'react-forcefield, wrap some code in the <Forcefield> component, and voilà!

import React from 'react'
import Forcefield from 'react-forcefield'
 
const Example = () => (
  <Forcefield>
    <iframe
      src="https://basic-map.coston.io"
      style={{ border: '1px #eee solid' }}
      height="800px"
      width="100%"
    />
  </Forcefield>
)

Contributing

Please help make this component better. All issues and/or pull requests are very welcome.

License

MIT License

Package Sidebar

Install

npm i react-forcefield

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

8.45 kB

Total Files

4

Last publish

Collaborators

  • coston