@props([ 'title' => null, 'subtitle' => null, 'icon' => null, 'tone' => null, 'padding' => 'md', 'header' => null, 'footer' => null, 'actions' => null, ]) @php $padClass = match($padding) { 'sm' => 'card--pad-sm', 'md' => 'card--pad-md', 'lg' => 'card--pad-lg', 'none' => 'card--pad-none', default => 'card--pad-md', }; $toneClass = $tone ? 'card--tone-' . $tone : ''; $classes = trim('card ' . $padClass . ' ' . $toneClass); @endphp
merge(['class' => $classes]) }}> @if($title || $subtitle || $icon || $actions || isset($header))
@if(isset($header)) {{ $header }} @else
@if($icon) {!! icon($icon) !!} @endif
@if($title)

{{ $title }}

@endif @if($subtitle)

{{ $subtitle }}

@endif
@if($actions)
{{ $actions }}
@endif @endif
@endif
{{ $slot }}
@if(isset($footer)) @endif