Skip to content

blackbird-agency/hyva-tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hyva Tooltip   Latest Stable Version License: MIT

This Magento 2 module will allow you to easily display tooltip in your Hyvä Theme.

Installation

composer require blackbird/hyva-tooltip
php bin/magento setup:upgrade

Usage

<button id="button-<?= $uniqueId ?>"
        x-data="blackbird.tooltip({
            tooltipSelector: '#tooltip-<?= $uniqueId ?>',
        })"
>
    My button
</button>

<div id="tooltip-<?= $uniqueId ?>" blackbird-tooltip>My tooltip</div>
<button id="button-<?= $uniqueId ?>">My button</button>

<div id="tooltip-<?= $uniqueId ?>"
     blackbird-tooltip
     x-data="blackbird.tooltip({
         buttonSelector: '#button-<?= $uniqueId ?>',
     })"
>
    My tooltip
</div>
<div x-data="blackbird.tooltip({
         buttonSelector: '#button-<?= $uniqueId ?>',
         tooltipSelector: '#tooltip-<?= $uniqueId ?>',
     })">
</div>

<button id="button-<?= $uniqueId ?>">My button</button>
<div id="tooltip-<?= $uniqueId ?>" blackbird-tooltip>My tooltip</div>