Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored and github-actions[bot] committed Oct 4, 2024
1 parent f6d32d9 commit 9540599
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/Laravel/src/Pages/Crud/IndexPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use MoonShine\Support\Enums\JsEvent;
use MoonShine\Support\Enums\PageType;
use MoonShine\UI\Components\ActionGroup;
use MoonShine\UI\Components\FlexibleRender;
use MoonShine\UI\Components\Layout\Block;
use MoonShine\UI\Components\Layout\Div;
use MoonShine\UI\Components\Layout\Flex;
Expand Down Expand Up @@ -87,21 +86,23 @@ protected function bottomLayer(): array
{
$pageComponents = $this->getResource()->getIndexPageComponents();

if($this->getResource()->isEditInModal()) {
if ($this->getResource()->isEditInModal()) {
$pageComponents[] = Modal::make(
__('moonshine::ui.edit'),
components: [
Div::make()->customAttributes(['id' => 'resource-edit-modal']),
])
]
)
->name('resource-edit-modal');
}

if($this->getResource()->isDetailInModal()) {
if ($this->getResource()->isDetailInModal()) {
$pageComponents[] = Modal::make(
__('moonshine::ui.show'),
components: [
Div::make()->customAttributes(['id' => 'resource-detail-modal']),
])
]
)
->name('resource-detail-modal');
}

Expand Down
5 changes: 2 additions & 3 deletions src/UI/src/Components/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Illuminate\View\ComponentSlot;
use MoonShine\Contracts\UI\ActionButtonContract;
use MoonShine\Support\AlpineJs;
use MoonShine\Support\Enums\JsEvent;
use Throwable;

/**
Expand Down Expand Up @@ -98,11 +97,11 @@ public function toggleEvents(array $events, bool $onlyOpening = false, $onlyClos
'data-closing-events' => AlpineJs::prepareEvents($events),
];

if($onlyOpening) {
if ($onlyOpening) {
unset($data['data-closing-events']);
}

if($onlyClosing) {
if ($onlyClosing) {
unset($data['data-opening-events']);
}

Expand Down
4 changes: 2 additions & 2 deletions src/UI/src/Components/OffCanvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function toggleEvents(array $events, bool $onlyOpening = false, $onlyClos
'data-closing-events' => AlpineJs::prepareEvents($events),
];

if($onlyOpening) {
if ($onlyOpening) {
unset($data['data-closing-events']);
}

if($onlyClosing) {
if ($onlyClosing) {
unset($data['data-opening-events']);
}

Expand Down

0 comments on commit 9540599

Please sign in to comment.