diff --git a/resources/views/components/modal.blade.php b/resources/views/components/modal.blade.php index ffb01c44..f77b271d 100644 --- a/resources/views/components/modal.blade.php +++ b/resources/views/components/modal.blade.php @@ -78,18 +78,19 @@ @endif
{{ $subtitle }}
+filled($title) || $icon, 'max-sm:mt-0' => $fullscreen && ! $icon])>{{ $subtitle }}
@endif @if ($separator) diff --git a/tests/Feature/Components/OverlayTest.php b/tests/Feature/Components/OverlayTest.php index 124f610f..1539a211 100644 --- a/tests/Feature/Components/OverlayTest.php +++ b/tests/Feature/Components/OverlayTest.php @@ -44,6 +44,17 @@ it('uses the surrounding Alpine scope without wire:model, and stays open when pe ->toContain('aria-label="Close"'); }); +it('keeps a full-screen dialog\'s subtitle on a phone, where its bar carries the title', function () { + $html = (string) $this->blade('Scan the code
') + ->not->toContain('Only a subtitle
'); +}); + it('slides a side sheet in from either edge, and is a pane from xl when asked', function () { expect((string) $this->blade('