Nesting Penguins Molt

    @react-lit/popover
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.0 • Public • Published

    @react-lit/popover

    Installation

    $ npm i @react-lit/popover
    # or
    $ yarn add @react-lit/popover

    Example

    import * as React from "react";
    import { Popover, positionDefault } from "@react-lit/popover";
    
    function Example() {
      const ref = React.useRef(null);
      const [value, setValue] = React.useState("");
      return (
        <div>
          <label>
            <span>Type for a special message</span>
            <input
              type="text"
              ref={ref}
              onChange={(event) => setValue(event.target.value)}
            />
          </label>
    
          {value.length > 0 && (
            <Popover targetRef={ref} position={positionDefault}>
              <div>
                <p>Whoa! Look at me!</p>
              </div>
            </Popover>
          )}
        </div>
      );
    }

    Development

    (1) Install dependencies

    $ npm i
    # or
    $ yarn

    (2) Run initial validation

    $ ./Taskfile.sh validate

    (3) Run tests in watch-mode to validate functionality.

    $ ./Taskfile test -w

    This project was set up by @jvdx/core

    Keywords

    none

    Install

    npm i @react-lit/popover

    DownloadsWeekly Downloads

    9

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    16.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • joelvoss