liip / bootstrap-blocks-wordpress-plugin

Bootstrap Gutenberg Blocks for WordPress
https://wordpress.org/plugins/wp-bootstrap-blocks/
279 stars 60 forks source link

Improvement to the property name and how the button styles are generated #118

Closed isaumya closed 1 year ago

isaumya commented 1 year ago

Here is the list of improvements that I have made:

  1. In the constants.js file I've added a new variable named bgColors which now holds all the options for the background colors. I've also used the colors variable but now it holds the text color options.
  2. In the /src/buttons/edit.js I've updated the code to call the bgColors and colors from constants and then use them inside the code to set up the background-color and color properties accordingly.
  3. I've also updated the /src/coloum/edit.js file to ensure that now it imports bgColors from constants and uses that inside the code.
  4. Executed the build command to generate the new build files.
  5. Tested the updated code and ensured that things are working properly as they should.
  6. Updated the README.md file for the wpBootstrapBlocks.button.styleOptions filter so that now it shows users how they can add both the bgColor and color properties while using the filter.
  7. I've tested the code by adding custom style options for the button and ensure everything is working properly.

Please take a look at the PR and let me when you can publish it.