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

Update ActionButton.vue to permit custom button classes to be truly customized #17

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

k8n
Copy link

@k8n k8n commented Nov 22, 2024

As an example, specifying ->classes(['rounded-full']) on an action button would have no effect unless the default 'rounded' class is removed.

This change make custom classes specified on an Action Button replace the non-essential default classes instead of merging with them.

@pavloniym
Copy link
Owner

Will be merged within next week!

@ekateiva
Copy link

ekateiva commented Dec 11, 2024

What do you think, if to add flexibility to add/modify classes for buttons container as well? I mean by using ActionButtons::make()->classes()... as for ActionButton.
https://github.com/pavloniym/nova-action-buttons/blob/main/resources/js/components/DetailActionButtonsField.vue#L4

E.g. When there are more buttons - it's barely usable on mobile. It could be fixed by using some flex classes on smaller screen, but now it's not possible. E.g.
Screenshot 2024-12-10 at 18 08 28

Could be something like this in mobile.
Screenshot 2024-12-10 at 18 10 11

Or, at least maybe having default style as flex flex-wrap gap-2 items-center, which would be helpful on mobile.

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

Successfully merging this pull request may close these issues.

3 participants