Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajustando o alinhamento no conteúdo do modal #400

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/views/modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class="fixed inset-0 z-10 overflow-y-auto"
style="display: none;"
>
<div class="flex items-end justify-center min-h-screen px-4 pt-4 pb-10 text-center sm:block sm:p-0">
<div class="flex {{ $align }} justify-center min-h-screen px-4 pt-4 pb-10 text-center sm:block sm:p-0">
<div
x-show="show"
x-on:click="closeModalOnClickAway()"
Expand Down
1 change: 1 addition & 0 deletions src/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function openModal($component, $arguments = [], $modalAttributes = []): v
'destroyOnClose' => $componentClass::destroyOnClose(),
'maxWidth' => $componentClass::modalMaxWidth(),
'maxWidthClass' => $componentClass::modalMaxWidthClass(),
'align' => $componentClass::align(),
], $modalAttributes),
];

Expand Down
3 changes: 3 additions & 0 deletions src/ModalComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ abstract class ModalComponent extends Component implements Contract
'7xl' => 'sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl',
];

protected static string $align = "items-end";


public function destroySkippedModals(): self
{
$this->destroySkipped = true;
Expand Down