1.0.38 • Published 2 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
2 years ago
1.0.37
2 years ago
1.0.36
2 years ago
1.0.35
2 years ago
1.0.29
2 years ago
1.0.28
2 years ago
1.0.33
2 years ago
1.0.32
2 years ago
1.0.31
2 years ago
1.0.27
2 years ago
1.0.26
3 years ago
1.0.24
3 years ago
1.0.24-beta.2
3 years ago
1.0.24-beta.0
3 years ago
1.0.24-beta.1
3 years ago
1.0.23
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago