laravel-12/resources/views/components/form/button.blade.php

13 lines
280 B
PHP

@props([
'type' => 'submit',
'variant' => 'primary',
'label',
'href' => null,
])
@if($href)
<a href="{{ $href }}" class="btn btn-{{ $variant }}">{{ $label }}</a>
@else
<button type="{{ $type }}" class="btn btn-{{ $variant }}">{{ $label }}</button>
@endif