Section heading text color

Is it possible to change "section" heading text color based on record?
2 Replies
Patrick Boivin
Patrick Boivin14mo ago
Hi @alexander7479, one option would be to add a custom CSS class on the section :
Section::make('A Section')
->schema([ ... ])
->extraAttributes(fn ($record) => ['class' => $record ? "section-{$record->type}" : ""]),
Section::make('A Section')
->schema([ ... ])
->extraAttributes(fn ($record) => ['class' => $record ? "section-{$record->type}" : ""]),
AlexAnder
AlexAnder14mo ago
Thanks