PHP code example of elbytes / nova-tooltip-field

1. Go to this page and download the library: Download elbytes/nova-tooltip-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elbytes / nova-tooltip-field example snippets


use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type'), 

// OR

Tooltip::make('Type', 'type')
       ->setDefaultIcon('<svg width="18" height="18">...</svg>') // Optional
       ->setDependIcons([
           'fieldValue' => '<svg width="18" height="18">...</svg>',
           'fieldValue2' => '<svg width="18" height="18">...</svg>',
       ]), // Optional

use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type')
    ->setDefaultIcon('<svg class="h-5 w-5">...</svg>')

use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type')
       ->setDependIcons([
           'fieldValue' => '<svg class="h-5 w-5">...</svg>',
           'fieldValue2' => '<svg class="h-5 w-5">...</svg>',
       ]),