Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Sep 6, 2024
1 parent 7db6c9d commit 4fb1671
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 3 additions & 5 deletions resources/views/mails/html.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<div class="prose prose-sm sm:prose lg:prose-lg xl:prose-2xl">
<pre>
<code lang="html">
{{ $html }}
</code>
<div class="prose prose-sm sm:prose lg:prose-lg xl:prose-2xl max-w-full overflow-x-auto">
<pre class="whitespace-pre-wrap break-words">
<code class="language-html">{{ $html }}</code>
</pre>
</div>
6 changes: 5 additions & 1 deletion resources/views/mails/preview.blade.php
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<iframe src="{{ route('mail.preview', ['mail' => $mail->id]) }}" width="100%" height="700"></iframe>
<div class="w-full h-screen">
<iframe src="{{ route('mail.preview', ['mail' => $mail->id]) }}" class="w-full h-full max-w-full"
style="width: 100vw; height: 100vh; border: none;">
</iframe>
</div>
2 changes: 2 additions & 0 deletions src/Resources/MailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static function infolist(Infolist $infolist): Infolist
TextEntry::make('html')
->hiddenLabel()
->label(__('HTML Content'))
->extraAttributes(['class' => 'overflow-x-auto'])
->formatStateUsing(fn(string $state, Mail $record): View => view(
'filament-mails::mails.preview',
['html' => $state, 'mail' => $record],
Expand All @@ -196,6 +197,7 @@ public static function infolist(Infolist $infolist): Infolist
->schema([
TextEntry::make('html')
->hiddenLabel()
->extraAttributes(['class' => 'overflow-x-auto'])
->formatStateUsing(fn(string $state, Mail $record): View => view(
'filament-mails::mails.html',
['html' => $state, 'mail' => $record],
Expand Down

0 comments on commit 4fb1671

Please sign in to comment.