23 lines
459 B
PHP
23 lines
459 B
PHP
<?php
|
|
|
|
namespace App\View\Ui;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
class Button extends Component
|
|
{
|
|
|
|
public function __construct(public string $type = 'button')
|
|
{
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return <<<'HTML'
|
|
<button type="{{$type}}" class="px-3 py-2 uppercase no-underline text-sm items-center justify-center bg-primary-700 rounded text-primary-300">
|
|
{{$slot}}
|
|
</button>
|
|
HTML;
|
|
}
|
|
}
|