@evergis/react 3.1.77 → 3.1.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7752,10 +7752,11 @@ const ElementChart = React.memo(({ type, elementConfig, renderElement }) => {
7752
7752
  const ElementChips = React.memo(({ type, elementConfig }) => {
7753
7753
  const { attributes } = useWidgetContext(type);
7754
7754
  const { attributeName, options, style } = elementConfig || {};
7755
- const { separator, bgColor, fontColor, fontSize } = options || {};
7756
- const attribute = getAttributeByName(attributeName, attributes);
7757
- const tags = attribute?.value?.split(separator || ",");
7758
- return (jsxRuntime.jsx(DashboardChipsContainer, { style: style, children: tags?.map(tag => (jsxRuntime.jsx(DashboardChip$1, { text: tag, "$bgColor": bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$isDefault": true }, tag))) }));
7755
+ const { separator, bgColor, fontColor, fontSize, colorAttribute } = options || {};
7756
+ const valueAttr = getAttributeByName(attributeName, attributes);
7757
+ const colorAttr = getAttributeByName(colorAttribute, attributes);
7758
+ const tags = valueAttr?.value?.split(separator || ",");
7759
+ return (jsxRuntime.jsx(DashboardChipsContainer, { style: style, children: tags?.map(tag => (jsxRuntime.jsx(DashboardChip$1, { text: tag, "$bgColor": colorAttr?.value || bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$isDefault": !colorAttr?.value }, tag))) }));
7759
7760
  });
7760
7761
 
7761
7762
  const StyledIconFontSizeMixin = styled.css `