1.0.38 • Published 3 years ago
@stephenpoole/hex-tooltip v1.0.38
Hex: Tooltip
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
- Insert the script tag in your html head:
<script src="https://cdn.jsdelivr.net/npm/@stephenpoole/hex-tooltip/dist/hex.tooltip.js"></script>
- 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
- Import
hex-tooltip
into your application:
import HexTooltip from "@stephenpoole/hex-tooltip";
- 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
1.0.38
3 years ago
1.0.37
3 years ago
1.0.36
3 years ago
1.0.35
3 years ago
1.0.29
3 years ago
1.0.28
3 years ago
1.0.33
3 years ago
1.0.32
3 years ago
1.0.31
3 years ago
1.0.27
4 years ago
1.0.26
4 years ago
1.0.24
4 years ago
1.0.24-beta.2
4 years ago
1.0.24-beta.0
4 years ago
1.0.24-beta.1
4 years ago
1.0.23
4 years ago
1.0.22
4 years ago
1.0.21
4 years ago
1.0.20
4 years ago
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago