Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
lam0819 authored and github-actions[bot] committed May 9, 2024
1 parent 15b23c8 commit 12719b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/SimpleLightBoxPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ public function boot(Panel $panel): void
ImageColumn::macro('simpleLightbox', macro: function ($url = null) {
$extraAttributes = $this->extraAttributes[0] ?? [];
$extraImgAttributes = $this->extraImgAttributes[0] ?? [];

/** @phpstan-ignore-next-line */
return $this
->openUrlInNewTab()
->extraAttributes(array_merge($extraAttributes, ['x-on:click' => 'SimpleLightBox.open(event, \''.$url.'\')']))
->extraAttributes(array_merge($extraAttributes, ['x-on:click' => 'SimpleLightBox.open(event, \'' . $url . '\')']))
->extraImgAttributes(array_merge($extraImgAttributes, ['class' => 'simple-light-box-img-indicator']));
});

ImageEntry::macro('simpleLightbox', function ($url = null) {
$extraAttributes = $this->extraAttributes[0] ?? [];
$extraImgAttributes = $this->extraImgAttributes[0] ?? [];

/** @phpstan-ignore-next-line */
return $this
->openUrlInNewTab()
Expand All @@ -48,18 +50,20 @@ public function boot(Panel $panel): void

TextColumn::macro('simpleLightbox', function ($url) {
$extraAttributes = $this->extraAttributes[0] ?? [];

/** @phpstan-ignore-next-line */
return $this
->openUrlInNewTab()
->extraAttributes(array_merge($extraAttributes,['x-on:click' => 'SimpleLightBox.open(event, \'' . $url . '\')']));
->extraAttributes(array_merge($extraAttributes, ['x-on:click' => 'SimpleLightBox.open(event, \'' . $url . '\')']));
});

TextEntry::macro('simpleLightbox', function ($url) {
$extraAttributes = $this->extraAttributes[0] ?? [];

/** @phpstan-ignore-next-line */
return $this
->openUrlInNewTab()
->extraAttributes(array_merge($extraAttributes,['x-on:click' => 'SimpleLightBox.open(event, \'' . $url . '\')']));
->extraAttributes(array_merge($extraAttributes, ['x-on:click' => 'SimpleLightBox.open(event, \'' . $url . '\')']));
});

}
Expand Down

0 comments on commit 12719b4

Please sign in to comment.