Git Product home page Git Product logo

hex-tooltip's Introduction

Hex: Tooltip

npm version Known Vulnerabilities Build Status codecov last commit issues

Tooltips for Dead by Daylight anywhere on the web.

Getting Started

Install hex-tooltip and save to your package.json in one easy step.

With npm:

npm install @stephenpoole/hex-tooltip

With yarn:

yarn add @stephenpoole/hex-tooltip

Usage

In the browser globally

  1. Insert the script tag in your html head:
<script src="https://cdn.jsdelivr.net/npm/@stephenpoole/hex-tooltip/dist/hex.tooltip.js"></script>
  1. Pass an HTMLElement containing a tooltip tag: Try it out
<div id="hex-tooltip"><span class="hex-tooltip-959f26b8824a7"></span></div>
HexTooltip.parse(document.getElementById("hex-tooltip"));

In the browser with webpack

  1. Import hex-tooltip into your application:
import HexTooltip from "@stephenpoole/hex-tooltip";
  1. Pass an HTMLElement containing a tooltip tag:
HexTooltip.parse(document.getElementById("hex-tooltip"));

2a. or mount it in your React application

import HexTooltip, { HexTooltipApp, PerkTooltip, PerkModel, DeadByDaylight } from "@stephenpoole/hex-tooltip";

const model = HexTooltip.toModel("Hex: Ruin");
const { rarity, name, description, flavor, owner } = model as PerkModel;

<HexTooltipApp
    title="<span class="hex-tooltip-d9d3e49cb23dd"></span>"
    tooltip={
        <PerkTooltip
            rarity={rarity}
            name={name}
            description={description}
            flavor={flavor}
            owner={owner}
            tier={tier}
        />
    }
/>

Documentation

You'll find the type documentation here: Documentation

License

MIT

hex-tooltip's People

Contributors

miasmos avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.