tooltip component edited
This commit is contained in:
parent
aa0a08d4bd
commit
7dd0d707b5
@ -25,6 +25,8 @@ class Tooltip extends Component
|
|||||||
|
|
||||||
public $whitespace;
|
public $whitespace;
|
||||||
|
|
||||||
|
public $width;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new component instance.
|
* Create a new component instance.
|
||||||
*
|
*
|
||||||
@ -36,6 +38,7 @@ class Tooltip extends Component
|
|||||||
string $message = '',
|
string $message = '',
|
||||||
string $size = '',
|
string $size = '',
|
||||||
string $whitespace = '',
|
string $whitespace = '',
|
||||||
|
string $width = 'auto',
|
||||||
) {
|
) {
|
||||||
$this->id = $this->getId($id);
|
$this->id = $this->getId($id);
|
||||||
$this->placement = $this->getPlacement($placement);
|
$this->placement = $this->getPlacement($placement);
|
||||||
@ -48,6 +51,7 @@ class Tooltip extends Component
|
|||||||
$this->message = $this->getMessage($message);
|
$this->message = $this->getMessage($message);
|
||||||
$this->size = $this->getSize($size);
|
$this->size = $this->getSize($size);
|
||||||
$this->whitespace = $this->getWhiteSpace($whitespace);
|
$this->whitespace = $this->getWhiteSpace($whitespace);
|
||||||
|
$this->width = $width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@props(['module', 'installed', 'enable'])
|
@props(['module', 'installed', 'enable'])
|
||||||
|
|
||||||
@if (! empty($module->plan))
|
@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
|
<x-link
|
||||||
href="{{ $module->action_url }}"
|
href="{{ $module->action_url }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@ -83,7 +83,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
@if ($module->install)
|
@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
|
<x-link
|
||||||
href="{{ $module->action_url }}"
|
href="{{ $module->action_url }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
@ -94,7 +94,7 @@
|
|||||||
</x-link>
|
</x-link>
|
||||||
</x-tooltip>
|
</x-tooltip>
|
||||||
@else
|
@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
|
<x-link
|
||||||
href="{{ $module->action_url }}"
|
href="{{ $module->action_url }}"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -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 !!}
|
{!! $slot !!}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user