@eeacms/volto-block-style
Advanced tools
Comparing version 3.2.3 to 3.2.4
@@ -7,4 +7,10 @@ ### Changelog | ||
#### [3.2.4](https://github.com/eea/volto-block-style/compare/3.2.3...3.2.4) | ||
- Conditionally render StyleSelect widget [`#14`](https://github.com/eea/volto-block-style/pull/14) | ||
#### [3.2.3](https://github.com/eea/volto-block-style/compare/3.2.2...3.2.3) | ||
> 14 May 2021 | ||
- Debounce on resize callback [`#13`](https://github.com/eea/volto-block-style/pull/13) | ||
@@ -11,0 +17,0 @@ - Resolve conflict [`9ef6b8b`](https://github.com/eea/volto-block-style/commit/9ef6b8b18b9c42dc12a80500921067ad9ad971f7) |
{ | ||
"name": "@eeacms/volto-block-style", | ||
"version": "3.2.3", | ||
"version": "3.2.4", | ||
"description": "volto-block-style: Volto add-on", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -31,24 +31,26 @@ import React from 'react'; | ||
<> | ||
<FormFieldWrapper {...props}> | ||
<Card.Group itemsPerRow={2} className="style-select-widget"> | ||
{pluggableStyles.map((style) => { | ||
return ( | ||
<Card | ||
as="div" | ||
name={style.id} | ||
onClick={() => | ||
onChange(id, style.id === value ? null : style.id) | ||
} | ||
key={style.id} | ||
className={cx({ active: style.id === value })} | ||
> | ||
<Card.Content> | ||
<Item.Image size="tiny">{renderPreview(style)}</Item.Image> | ||
</Card.Content> | ||
<Card.Content extra>{style.title}</Card.Content> | ||
</Card> | ||
); | ||
})} | ||
</Card.Group> | ||
</FormFieldWrapper> | ||
{pluggableStyles.length > 0 && ( | ||
<FormFieldWrapper {...props}> | ||
<Card.Group itemsPerRow={2} className="style-select-widget"> | ||
{pluggableStyles.map((style) => { | ||
return ( | ||
<Card | ||
as="div" | ||
name={style.id} | ||
onClick={() => | ||
onChange(id, style.id === value ? null : style.id) | ||
} | ||
key={style.id} | ||
className={cx({ active: style.id === value })} | ||
> | ||
<Card.Content> | ||
<Item.Image size="tiny">{renderPreview(style)}</Item.Image> | ||
</Card.Content> | ||
<Card.Content extra>{style.title}</Card.Content> | ||
</Card> | ||
); | ||
})} | ||
</Card.Group> | ||
</FormFieldWrapper> | ||
)} | ||
</> | ||
@@ -55,0 +57,0 @@ ); |
64907
880