@include('emails.partials.brand-colors') {{-- Email Button Component Usage: @component('emails.components.button', ['href' => 'https://example.com', 'variant' => 'primary']) Click Me @endcomponent Props: - href: Link URL (required) - variant: 'primary', 'secondary', 'success', 'danger' (default: 'primary') - size: 'small', 'medium', 'large' (default: 'medium') - align: 'left', 'center', 'right' (default: 'center') --}} @php $href = $href ?? '#'; $variant = $variant ?? 'primary'; $size = $size ?? 'medium'; $align = $align ?? 'center'; // Button variant styles $variantStyles = [ 'primary' => "background-color: {$colors['btn-primary-bg']}; color: #ffffff;", 'secondary' => "background-color: {$colors['btn-secondary-bg']}; color: #ffffff;", 'success' => "background-color: {$colors['jade']}; color: #ffffff;", 'danger' => "background-color: {$colors['carnelian']}; color: #ffffff;", 'outline' => "background-color: transparent; color: {$colors['btn-primary-bg']}; border: 2px solid {$colors['btn-primary-bg']};", ]; // Button sizes $sizeStyles = [ 'small' => 'padding: 10px 24px; font-size: 14px;', 'medium' => 'padding: 14px 32px; font-size: 16px;', 'large' => 'padding: 18px 40px; font-size: 18px;', ]; $buttonStyle = ($variantStyles[$variant] ?? $variantStyles['primary']) . ' ' . ($sizeStyles[$size] ?? $sizeStyles['medium']); @endphp
| {{ $slot }} |