{{-- Banner (DESIGN.md Components > Banners): tinted inline message with an icon and one sentence. Props: type (info|ok|warn|bad), icon (defaults per type). Slots: default (the sentence), action (one quiet x-nh.button). Add role="status" or role="alert" through attributes when the banner appears after an action. --}} @props(['type' => 'info', 'icon' => null]) @php $type = in_array($type, ['info', 'ok', 'warn', 'bad'], true) ? $type : 'info'; $icon = $icon ?? ['info' => 'info', 'ok' => 'check', 'warn' => 'warning', 'bad' => 'warning'][$type]; @endphp
class(['nh-banner', 'nh-banner-'.$type]) }}>

{{ $slot }}

{{ $action ?? '' }}