how add css property in action button in resources/createpage

this is my code Actions\CreateAction::make() ->label('Generate from ChatGPT') how i will add css float:right in this button
9 Replies
seetakanta
seetakantaOP2y ago
please give me any solution
LeandroFerreira
You could add on the CreatePage.php
use Filament\Support\Enums\Alignment;
public static string | Alignment $formActionsAlignment = Alignment::Right;
use Filament\Support\Enums\Alignment;
public static string | Alignment $formActionsAlignment = Alignment::Right;
seetakanta
seetakantaOP2y ago
it was not working
LeandroFerreira
Coud you share a screenshot?
seetakanta
seetakantaOP2y ago
this is
No description
seetakanta
seetakantaOP2y ago
public function getActions(): array { return [ Actions\CreateAction::make() ->label('Generate from ChatGPT') ->action(fn () => $this->fillFormFields1()) ->disabled($disableGenerateButton) // ->color($formFilled ? 'success' : 'secondary') ->color('success') ->outlined() ->extraAttributes([ 'class' => 'float-right', ]), ]; } i wrote this in my creatResourecesname.php page
LeandroFerreira
Something you have changed because the header actions would appear on the right side
No description
seetakanta
seetakantaOP2y ago
ok sir thank you can you tell me how i change height and width of this button
LeandroFerreira
via ->extraAttributes(['class' => 'xx', 'style' => 'xx'])

Did you find this page helpful?