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

[Next] Custom components #44

Merged
merged 9 commits into from
Jul 22, 2024
Merged

[Next] Custom components #44

merged 9 commits into from
Jul 22, 2024

Conversation

joshhanley
Copy link
Owner

This PR adds a command to copy custom components to users applications, so they can customise the style of them without having to style the autocomplete component every time it is used.

The command is php artisan autocomplete:custom-components.

Running this command will make a directory resources/views/components/autocomplete and create local blade components that reference the underlying autocomplete components and setting them to unstyled.

A user can then customise the style of these local components.

For these components to work though, the use_global_namespace config must be set to false.

Note: This PR also makes the following changes:
It moves the default location of all the components from x-autocomplete- to x-autocomplete.. For example <x-autocomplete-input> is now <x-autocomplete.input>. So a search and replace of x-autocomplete- to x-autocomplete. is recommended.

The service provider has also been renamed, so a composer dump-autoload is recommended after update.

@edalzell
Copy link

Awesome!

@joshhanley joshhanley merged commit 664778d into next Jul 22, 2024
5 checks passed
@joshhanley joshhanley deleted the next-custom-components branch July 22, 2024 10:51
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.

2 participants