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
seetakantaOP16mo ago
please give me any solution
LeandroFerreira
LeandroFerreira16mo ago
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
seetakantaOP16mo ago
it was not working
LeandroFerreira
LeandroFerreira16mo ago
Coud you share a screenshot?
seetakanta
seetakantaOP16mo ago
this is
No description
seetakanta
seetakantaOP16mo 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
LeandroFerreira16mo ago
Something you have changed because the header actions would appear on the right side
No description
seetakanta
seetakantaOP16mo ago
ok sir thank you can you tell me how i change height and width of this button
LeandroFerreira
LeandroFerreira16mo ago
via ->extraAttributes(['class' => 'xx', 'style' => 'xx'])

Did you find this page helpful?