Display Product Categories List block additional CSS class in the editor
This commit is contained in:
parent
f4de23ac92
commit
33e806ea9e
|
@ -84,13 +84,16 @@ class ProductCategoriesBlock extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { attributes, instanceId } = this.props;
|
const { attributes, instanceId } = this.props;
|
||||||
const { isDropdown } = attributes;
|
const { className, isDropdown } = attributes;
|
||||||
const categories = getCategories( attributes );
|
const categories = getCategories( attributes );
|
||||||
const classes = classnames( {
|
const classes = classnames(
|
||||||
'wc-block-product-categories': true,
|
'wc-block-product-categories',
|
||||||
|
className,
|
||||||
|
{
|
||||||
'is-dropdown': isDropdown,
|
'is-dropdown': isDropdown,
|
||||||
'is-list': ! isDropdown,
|
'is-list': ! isDropdown,
|
||||||
} );
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const selectId = `prod-categories-${ instanceId }`;
|
const selectId = `prod-categories-${ instanceId }`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue