connection back-end controller
This commit is contained in:
parent
ffcc34b646
commit
e9aa7f81f4
32
app/View/Components/MargueeText.php
Normal file
32
app/View/Components/MargueeText.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\View\Components;
|
||||
|
||||
use App\Abstracts\View\Component;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class MargueeText extends Component
|
||||
{
|
||||
public $width;
|
||||
|
||||
/**
|
||||
* Create a new component instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
string $width = 'auto'
|
||||
) {
|
||||
$this->width = $width;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\View|string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return view('components.marguee-text');
|
||||
}
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
<div class="flex lg:block truncate">
|
||||
<div data-truncate>
|
||||
<div
|
||||
@class([ $width ])
|
||||
data-truncate
|
||||
>
|
||||
{!! $slot !!}
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user