mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Rename maxSimplePageContentWidth to simplePageMaxContentWidth
This commit is contained in:
@@ -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;
|
||||
@@ -125,7 +125,7 @@ public function panel(Panel $panel): Panel
|
||||
{
|
||||
return $panel
|
||||
// ...
|
||||
->maxSimplePageContentWidth(MaxWidth::Small);
|
||||
->simplePageMaxContentWidth(MaxWidth::Small);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<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',
|
||||
|
||||
@@ -225,9 +225,9 @@ class FilamentManager
|
||||
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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
@@ -22,15 +22,15 @@ trait HasMaxContentWidth
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user