Socket
Socket
Sign inDemoInstall

@zohodesk/fullscreen

Package Overview
Dependencies
0
Maintainers
33
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @zohodesk/fullscreen

fullscreen in react


Version published
Weekly downloads
229
increased by15.08%
Maintainers
33
Install size
18.7 kB
Created
Weekly downloads
 

Readme

Source

@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

Keywords

FAQs

Last updated on 24 Jan 2024

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