Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action buttons with route functions are misaligned in the table #1561

Closed
Rosembergg opened this issue May 20, 2024 · 1 comment
Closed

Action buttons with route functions are misaligned in the table #1561

Rosembergg opened this issue May 20, 2024 · 1 comment

Comments

@Rosembergg
Copy link

Have you searched through other issues to see if your problem is already reported or has been fixed?

Yes, I did not find it.

Did you read the documentation?

Yes, I did not find it.

Have you tried to publish the views?

Yes - I didn't work.

Is there an error in the console?

No

PHP Version

8.1.2

PowerGrid

5.1

Laravel

10.48.3

Livewire

3.0

Alpine JS

No response

Theme

Tailwind 3.x

Describe the bug.

Action buttons with route functions are misaligned in the table, however when using the dispatch function, the buttons have the correct style

To Reproduce...

erro_buttons

Extra information

public function actions(\App\Models\User $row): array
    {

        return [
            Button::add('edit')
                ->slot('Editar')
                ->class('bg-kblue cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->openModal('form-usuario-modal', ['id' => $row->id]),

            Button::add('permission')
                ->slot('Permissões')
                ->class('bg-korange cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->route('controle.permissoes', ['user_id' => $row->id]),

            Button::add('function')
                ->slot('Funções')
                ->class('bg-kblue cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->route('controle.funcoes', ['user_id' => $row->id]),

            Button::add('rh')
                ->slot('RH')
                ->class('bg-korange cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->openModal('form-colaborador-modal', ['user_id' => $row->id]),

            Button::add('activate')
                ->slot('Ativar')
                ->class('bg-green-600 cursor-pointer text-white px-3 py-2 m-1 rounded text-sm')
                ->dispatch('ativar', ['id' => $row->id]),
        ];
    }
 <?php
 //...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants