Introducing the Bladewind config file #279
mkocansey
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The project I was working on while building the initial version of Bladewind influenced a lot of the default styling decisions I made. Rounded buttons, uppercasing table headings and button text, using blue as the default primary colour, very dark colours for dark mode etc.
I recently started a new project, pulled in Bladewind and found myself typing several attributes just to get the primary button I needed.
Imagine having to type this every time I needed a button. I'd go crazy before the project was done. I had to save myself and fast.
Step into the config file
The solution was to follow the Laravel way and introduce a configuration file that had all the defaults I needed unless I explicitly added an attribute on the component to overwrite it. Interestingly, it was a simple fix and a good addition to the library.
php artisan vendor:publish --tag=bladewind-config --force
project-root > config > bladewind.php
. The file contains defaults for all the Bladewind components so you won't need to be defining values from scratch. You will mostly be modifying values to suit your taste.For example, the button section of the file looks something like below
In my case, for the project I told you about that almost drove me nuts, I will modify my values to whats below
That is it 💯 !
I hope you find the config file useful like I did.
Beta Was this translation helpful? Give feedback.
All reactions