Display Product Categories List block additional CSS class in the editor

This commit is contained in:
Albert Juhé Lluveras 2019-07-01 10:51:56 +02:00 committed by Mike Jolley
parent f4de23ac92
commit 33e806ea9e
1 changed files with 9 additions and 6 deletions

View File

@ -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 }`;