liip / bootstrap-blocks-wordpress-plugin

Bootstrap Gutenberg Blocks for WordPress

Home Page:https://wordpress.org/plugins/wp-bootstrap-blocks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button modification

forcecodema opened this issue · comments

It would be nice feature to add the following option to button style in button/edit.js

{ label: __( 'None', 'wp-bootstrap-blocks' ), value: '' },

and remove empty check inside templates/button.php so that it looks

if ( array_key_exists( 'style', $attributes ) ) {

This would allow one to set style to other values than two default options (btn-primary | btn-secondary). One could specify style to none and then add additional value via className. There are some other bootstrap styles as well that would be nice to be able to choose from:

https://getbootstrap.com/docs/4.0/components/buttons/

Regards,

Michal

You're already able to add additional styles and modify the existing ones with the wpBootstrapBlocks.button.styleOptions JavaScript filter. The filter is documented here: https://github.com/liip/bootstrap-blocks-wordpress-plugin#wpbootstrapblocksbuttonstyleoptions.