ldc-groupe/resources/views/components/front/cta.blade.php
2025-12-02 10:12:01 +01:00

22 lines
606 B
PHP

@php
$type = isset($type) && $type ? $type : "link";
@endphp
@if($type === "link")
<a class="{{ isset($class) ? $class : 'engagements__btn'}} btn"
href="{{ $url }}"
title="{{ $title }}"
@if(isset($target)) target="{{ $target }}" @endif
@if(isset($download) and $download) download @endif
>
{!! $title !!}
<i class="btn__icon {{ $buttonIcon }}"></i>
</a>
@else
<button class="{{ isset($class) ? $class : 'engagements__btn'}} btn"
title="{{ $title }}" data-target="{{ isset($dataTarget) ? $dataTarget : ''}}"
>
{!! $title !!}
<i class="btn__icon {{ $buttonIcon }}"></i>
</button>
@endif