Nanoscale Parts Manufacturing

    preact-fullscreen

    0.1.2 • Public • Published

    Preact FullScreen

    npm versionLicense: MITBuild StatusDependencies

    Component that performs fullscreen in DOM Elements

    Installation

    npm i preact-fullscreen
    // OR
    yarn add preact-fullscreen
    

    Demo

    Local demo:

    git clone https://github.com/andrelmlins/preact-fullscreen.git
    cd preact-fullscreen
    yarn install && yarn start
    

    Examples

    import { h, render } from "preact";
    import PreactFullscreeen from "preact-ullscreen";
     
    const App = () => (
      <PreactFullscreeen>
        {({ ref, onRequest, onExit }) => (
          <div
            ref={ref}
            style={{ backgroundColor: "red", width: 120, height: 120 }}
          >
            <button onClick={() => onRequest()}>FullScreen</button>
            <button onClick={() => onExit()}>Screen</button>
          </div>
        )}
      </PreactFullscreeen>
    );
     
    render(<App />, document.body);

    Properties

    Prop Type Description
    onChange func Call in change
    onError func Call in error

    Children Function Properties

    Prop Type Description
    ref object Ref dom element
    onToggle func Call for fullscreen toggle
    onExit func Call for fullscreen exit
    onRequest func Call for fullscreen enter

    NPM Statistics

    Download stats for this NPM package

    NPM

    License

    Preact FullScreen is open source software licensed as MIT.

    Install

    npm i preact-fullscreen

    DownloadsWeekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    69.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • andrelmlins