fullscreen in react
npm install @zohodesk/fullscreenA React component that sets it fullscreen using the Fullscreen Component.
``bash`
npm install @zohodesk/fullscreen
`javascript`
import Fullscreen from '@zohodesk/fullscreen';
`jsx`
import React, { useState } from 'react';
import Fullscreen from '@zohodesk/fullscreen';
function Example() {
const [isEnabled, setIsEnabled] = useState(false);
return (
onClick={() => {
setIsEnabled(true);
}}
>
Go Fullscreen
);
}
export default Example;
Class fullscreenEnabled will be added to component when it goes fullscreen.
`css
.myComponent {
color: #fff;
}
.myComponent .fullscreenEnabled {
color: #000;
}
`
`js
//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
``
- Fullscreen basic functionality changes implemented.
- Test release
- Document changes
- Fixed css issue.
- Fixed render issue.
- removed old polyfills