tooltip component edited

This commit is contained in:
Burak Civan 2022-07-06 17:27:09 +03:00
parent aa0a08d4bd
commit 7dd0d707b5
3 changed files with 15 additions and 4 deletions

View File

@ -25,6 +25,8 @@ class Tooltip extends Component
public $whitespace;
public $width;
/**
* Create a new component instance.
*
@ -36,6 +38,7 @@ class Tooltip extends Component
string $message = '',
string $size = '',
string $whitespace = '',
string $width = 'auto',
) {
$this->id = $this->getId($id);
$this->placement = $this->getPlacement($placement);
@ -48,6 +51,7 @@ class Tooltip extends Component
$this->message = $this->getMessage($message);
$this->size = $this->getSize($size);
$this->whitespace = $this->getWhiteSpace($whitespace);
$this->width = $width;
}
/**

View File

@ -1,7 +1,7 @@
@props(['module', 'installed', 'enable'])
@if (! empty($module->plan))
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top">
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top" width="w-full">
<x-link
href="{{ $module->action_url }}"
target="_blank"
@ -83,7 +83,7 @@
@endif
@else
@if ($module->install)
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top">
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top" width="w-full">
<x-link
href="{{ $module->action_url }}"
target="_blank"
@ -94,7 +94,7 @@
</x-link>
</x-tooltip>
@else
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top">
<x-tooltip message="{{ trans('modules.hosted_on_akaunting') }}" placement="top" width="w-full">
<x-link
href="{{ $module->action_url }}"
target="_blank"

View File

@ -1,4 +1,11 @@
<span class="relative" data-tooltip-target="{{ $id }}" data-tooltip-placement="{{ $placement }}">
<span
@class([
'relative',
$width,
])
data-tooltip-target="{{ $id }}"
data-tooltip-placement="{{ $placement }}"
>
{!! $slot !!}
</span>