1.0.46 • Published 6 years ago

@appstractdk/as-tooltip v1.0.46

Weekly downloads
8
License
ISC
Repository
-
Last release
6 years ago

as-tooltip

Generic global tooltip component.

Usage

The following HTML is needed for the tooltip to work:

<div class="tooltip">
	<div class="tooltip-content"></div>
</div>

and then on any tooltipped element, you have the following data attribute:

<div class="myexample" data-tooltip="My tooltip here!"></div>

Another option, where there is a need to have the content of the tooltip formatted, you have to reference the element containing that data in data-tooltip-content attribute:

<div class="myexample" data-tooltip data-tooltip-content="#tooltip-template-content"></div>

<template id="tooltip-template-content">
	<h1>My tooltip here!</h1>
</template>