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 0e98026 commit 8035657
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/Laravel/src/Pages/Crud/IndexPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,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
4 changes: 2 additions & 2 deletions src/UI/src/Components/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,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 8035657

Please sign in to comment.