generated from boboko/starter
setting up front 1
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
@props([
|
||||
'tag' => 'button',
|
||||
'href' => null,
|
||||
'type' => 'button',
|
||||
'size' => 'lg',
|
||||
])
|
||||
|
||||
@php
|
||||
$tag = $href ? 'a' : $tag;
|
||||
|
||||
$sizeClasses = match($size) {
|
||||
'sm' => 'py-2 px-6 text-sm',
|
||||
'md' => 'py-3.5 px-6 text-base',
|
||||
default => 'py-5 px-[46px] text-[19px]',
|
||||
};
|
||||
|
||||
$class = 'btn-primary relative isolate inline-flex items-center justify-center border border-black font-display font-bold italic text-black cursor-pointer no-underline uppercase ' . $sizeClasses;
|
||||
|
||||
$attrs = $href
|
||||
? $attributes->merge(['href' => $href, 'class' => $class])
|
||||
: $attributes->merge(['type' => $type, 'class' => $class]);
|
||||
@endphp
|
||||
|
||||
<{{ $tag }} {{ $attrs }}>
|
||||
<span class="relative z-[1]">{{ $slot }}</span>
|
||||
</{{ $tag }}>
|
||||
Reference in New Issue
Block a user