college-courses/app/View/Components/PageHeading.php

33 lines
608 B
PHP

<?php
namespace App\View\Components;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class PageHeading extends Component
{
public $class;
/**
* Create a new component instance.
*/
public function __construct($class = '')
{
//
$this->class = $class;
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return <<<'blade'
<h1 class="text-5xl select-none {{ $class }}">
{{ $slot }}
</h1>
blade;
}
}