Initial PHP rebuild of the app
This commit is contained in:
690 files changed
+33944
-12046
No files matched your search
@@ -0,0 +1,24 @@
|
||||
@props(['variant' => 'primary', 'href' => null, 'size' => 'md'])
|
||||
|
||||
@php
|
||||
$classes = match ($variant) {
|
||||
'secondary' => 'border border-line bg-white text-ink hover:bg-stone',
|
||||
'accent' => 'bg-accent text-white hover:brightness-95',
|
||||
'ghost' => 'text-ink hover:bg-stone',
|
||||
default => 'bg-ink text-white shadow-lg shadow-ink/10 hover:bg-black',
|
||||
};
|
||||
$sizeClasses = match ($size) {
|
||||
'sm' => 'h-10 px-4 text-[10px]',
|
||||
default => 'h-12 px-6 text-xs',
|
||||
};
|
||||
@endphp
|
||||
|
||||
@if ($href)
|
||||
<a href="{{ $href }}" {{ $attributes->except('size')->merge(['class' => "inline-flex items-center justify-center gap-2 rounded-md font-bold uppercase tracking-widest transition-all {$sizeClasses} {$classes}"]) }}>
|
||||
{{ $slot }}
|
||||
</a>
|
||||
@else
|
||||
<button {{ $attributes->except('size')->merge(['class' => "inline-flex items-center justify-center gap-2 rounded-md font-bold uppercase tracking-widest transition-all {$sizeClasses} {$classes}"]) }}>
|
||||
{{ $slot }}
|
||||
</button>
|
||||
@endif
|
||||
Reference in new issue
Block a user