From 98983eb93793c51e7e332ded83c0964fa4f93351 Mon Sep 17 00:00:00 2001 From: Miu Razvan Date: Mon, 22 May 2023 12:11:45 +0300 Subject: [PATCH] feat: use slate_richtext widget instead of plain text --- src/StatisticBlock/View.jsx | 10 +++++----- src/StatisticBlock/schema.js | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/StatisticBlock/View.jsx b/src/StatisticBlock/View.jsx index a1f57b2..deab23f 100644 --- a/src/StatisticBlock/View.jsx +++ b/src/StatisticBlock/View.jsx @@ -71,10 +71,10 @@ const View = ({ data, mode }) => { ? { className: 'ui statistic', href: item.href } : {})} > - + {animation.enabled ? ( 0 ? animation.duration : 2} decimals={animation.decimals > 0 ? animation.decimals : 0} prefix={animation.prefix || ''} @@ -83,11 +83,11 @@ const View = ({ data, mode }) => { {(props) => } ) : ( - item.value + serializeText(item.value) )} - - {item.label} + + {serializeText(item.label)}
{serializeText(item.info)} diff --git a/src/StatisticBlock/schema.js b/src/StatisticBlock/schema.js index 5dfeb3a..a7c5eb1 100644 --- a/src/StatisticBlock/schema.js +++ b/src/StatisticBlock/schema.js @@ -13,9 +13,11 @@ const statisticSchema = { properties: { value: { title: 'Value', + widget: 'slate_richtext', }, label: { title: 'Label', + widget: 'slate_richtext', }, info: { title: 'Extra info',