rich-apple-5609
06/07/2023, 2:10 AMacceptable-kangaroo-64719
06/07/2023, 11:02 AMrich-apple-5609
06/07/2023, 3:29 PMc.default.createElement("button",{className:"bpw-button ",onClick:this.handleButtonClick},this.props.label)
with this:
c.default.createElement("button",{className:"bpw-button "+this.props.label.toLowerCase().trim().replace(/[^\w\s-]/g, '').replace(/[\s_-]+/g, '-').replace(/^-+|-+$/g, ''),onClick:this.handleButtonClick},this.props.label)
This will slugify the label of the button and add it as a class to the button. I have tested it and it works perfectly. I can now style the buttons individually. Would be nice if they can add something like this so I don't need to hack the file after every new release.acceptable-kangaroo-64719
06/07/2023, 3:36 PMrich-battery-69172
06/07/2023, 3:45 PMrich-battery-69172
06/07/2023, 3:45 PM