-
-
Save ManojKiranA/0ef91336f6f0fb7bcdb8921e37a6a0e5 to your computer and use it in GitHub Desktop.
Filament Block Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div | |
{{ $attributes->merge($getExtraAttributes()) }} | |
> | |
<details | |
class="open:bg-white dark:open:bg-slate-900/50 open:border-b open:border-gray-300 open:dark:border-gray-700 p-4 -mx-4 -mt-4 -mb-4 open:mb-0" | |
wire:ignore.self | |
wire:key="{{ $this->id }}.{{ $getStatePath() }}.block-settings" | |
> | |
<summary class="filament-link cursor-pointer text-sm">Block Settings</summary> | |
<div class="pt-6"> | |
{{ $getChildComponentContainer() }} | |
</div> | |
</details> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Forms\Components; | |
use Filament\Forms\Components\Group; | |
class BlockSettings extends Group | |
{ | |
protected string $view = 'filament.forms.components.block-settings'; | |
protected function setUp(): void | |
{ | |
$this->statePath('settings'); | |
$this->columnSpan('full'); | |
$this->columns(['md' => 12, 'lg' => null]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Block::make('rich-text') | |
->label('Rich Text') | |
->schema([ | |
BlockSettings::make([ | |
...fields | |
]), | |
... | |
]), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment