Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zohodesk/fullscreen

Package Overview
Dependencies
Maintainers
33
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zohodesk/fullscreen

fullscreen in react

  • 0.1.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
33
Created
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

Package last updated on 24 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc