Skip to content

Commit

Permalink
Rename maxSimplePageContentWidth to simplePageMaxContentWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
zepfietje committed Nov 28, 2024
1 parent cffdc21 commit 32ba98e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/panels/docs/09-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function panel(Panel $panel): Panel
}
```

If you'd like to set the max content width for pages of the type `SimplePage`, like login and registration pages, you may do so using the `maxSimplePageContentWidth()` method. The default is `Large`:
If you'd like to set the max content width for pages of the type `SimplePage`, like login and registration pages, you may do so using the `simplePageMaxContentWidth()` method. The default is `Large`:

```php
use Filament\Panel;
Expand All @@ -125,7 +125,7 @@ public function panel(Panel $panel): Panel
{
return $panel
// ...
->maxSimplePageContentWidth(MaxWidth::Small);
->simplePageMaxContentWidth(MaxWidth::Small);
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class="fi-simple-main-ctn flex w-full flex-grow items-center justify-center"
<main
@class([
'fi-simple-main my-16 w-full bg-white px-6 py-12 shadow-sm ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 sm:rounded-xl sm:px-12',
match ($maxWidth ??= (filament()->getMaxSimplePageContentWidth() ?? MaxWidth::Large)) {
match ($maxWidth ??= (filament()->getSimplePageMaxContentWidth() ?? MaxWidth::Large)) {
MaxWidth::ExtraSmall, 'xs' => 'max-w-xs',
MaxWidth::Small, 'sm' => 'max-w-sm',
MaxWidth::Medium, 'md' => 'max-w-md',
Expand Down
4 changes: 2 additions & 2 deletions packages/panels/src/FilamentManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ public function getMaxContentWidth(): MaxWidth | string | null
return $this->getCurrentPanel()->getMaxContentWidth();
}

public function getMaxSimplePageContentWidth(): MaxWidth | string | null
public function getSimplePageMaxContentWidth(): MaxWidth | string | null
{
return $this->getCurrentPanel()->getMaxSimplePageContentWidth();
return $this->getCurrentPanel()->getSimplePageMaxContentWidth();
}

public function getModelResource(string | Model $model): ?string
Expand Down
10 changes: 5 additions & 5 deletions packages/panels/src/Panel/Concerns/HasMaxContentWidth.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait HasMaxContentWidth
{
protected MaxWidth | string | null $maxContentWidth = null;

protected MaxWidth | string | null $maxSimplePageContentWidth = null;
protected MaxWidth | string | null $simplePageMaxContentWidth = null;

public function maxContentWidth(MaxWidth | string | null $maxContentWidth): static
{
Expand All @@ -22,15 +22,15 @@ public function getMaxContentWidth(): MaxWidth | string | null
return $this->maxContentWidth;
}

public function maxSimplePageContentWidth(MaxWidth | string | null $width): static
public function simplePageMaxContentWidth(MaxWidth | string | null $width): static
{
$this->maxSimplePageContentWidth = $width;
$this->simplePageMaxContentWidth = $width;

return $this;
}

public function getMaxSimplePageContentWidth(): MaxWidth | string | null
public function getSimplePageMaxContentWidth(): MaxWidth | string | null
{
return $this->maxSimplePageContentWidth;
return $this->simplePageMaxContentWidth;
}
}

0 comments on commit 32ba98e

Please sign in to comment.