liip / bootstrap-blocks-wordpress-plugin

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

Button modification #62

Closed forcecodema closed 4 years ago

forcecodema commented 4 years ago

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

tschortsch commented 4 years ago

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.