@zohodesk/fullscreen

0.1.6 • Public • Published

@zohodesk/fullscreen in react

A React component that sets it fullscreen using the Fullscreen Component.

Usage

Install

npm install @zohodesk/fullscreen

Import component

import Fullscreen from '@zohodesk/fullscreen';

Example

import React, { useState } from 'react';
import Fullscreen from '@zohodesk/fullscreen';
function Example() {
  const [isEnabled, setIsEnabled] = useState(false);
  return (
    <Fullscreen isEnabled={isEnabled} onChange={setIsEnabled}>
      <button
        onClick={() => {
          setIsEnabled(true);
        }}
      >
        Go Fullscreen
      </button>
    </Fullscreen>
  );
}
export default Example;

CSS

Class fullscreenEnabled will be added to component when it goes fullscreen.

.myComponent {
  color: #fff;
}

.myComponent .fullscreenEnabled {
  color: #000;
}

Fullscreen Props

//If true,  The fullscreen will be enabled
isEnabled : ?boolean = false,

//Will be added the fullscreen div element
className : ? (Object | String)

//Calls when fullscreen change
onChange : ?function

Version Changes

0.0.1

  • Fullscreen basic functionality changes implemented.

0.1.0, 0.1.1

  • Test release

0.1.2, 0.1.3

  • Document changes

0.1.4

  • Fixed css issue.

0.1.5

  • Fixed render issue.

0.1.6

  • removed old polyfills

Readme

Keywords

Package Sidebar

Install

npm i @zohodesk/fullscreen

Weekly Downloads

248

Version

0.1.6

License

ISC

Unpacked Size

19.1 kB

Total Files

12

Last publish

Collaborators

  • hariharan_vs
  • eldhose_saji
  • sankara.subramanian
  • madhubalan
  • deekay.npm
  • sheikbasheeth
  • jos33
  • rajsekar.haribalan
  • selvakumar.pl
  • muthumari
  • sundarrajkumar.m
  • prakash.m
  • maheshmdr
  • _dev_johnson
  • karuppiah.r
  • navas-0968
  • vallinayagam.t
  • iambk
  • lakshmi_ts
  • mariappan.r
  • antro.j
  • ganeshkumar.m
  • vimalesan
  • skumaresan
  • kathiresan.r
  • jesinth
  • sriramamoorthy
  • lingam
  • ponkumar.s
  • sudalaimuthu
  • iniankarthick
  • johnson_raavanan
  • ksamy2020
  • kumaresanm
  • villuvicky
  • indragith