Creando proyecto

This commit is contained in:
Bryam Cesar
2025-08-12 23:57:57 -03:00
parent 4c90b4e3df
commit 44e1da9693
82 changed files with 13823 additions and 30 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class Alert2 extends Component
{
public $class;
//* Create a new component instance.
public function __construct($type = 'dark')
{
switch ($type) {
case 'info':
$class = 'text-blue-800 bg-blue-50 dark:text-blue-400';
break;
case 'danger':
$class = 'text-red-800 bg-red-50 dark:text-red-400';
break;
case 'success':
$class = 'text-green-800 bg-green-50 dark:text-green-400';
break;
case 'warning':
$class = 'text-yellow-800 bg-yellow-50 dark:text-yellow-300';
break;
default:
$class = 'text-gray-800 bg-gray-50 dark:text-gray-300';
break;
}
$this->class = $class;
}
//* Get the view / contents that represent the component.
public function render(): View|Closure|string
{
return view('components.alert2');
}
}