diff --git a/src/components/manage/Blocks/DiscodataComponents/Text/View.jsx b/src/components/manage/Blocks/DiscodataComponents/Text/View.jsx index dce283f..371ddff 100644 --- a/src/components/manage/Blocks/DiscodataComponents/Text/View.jsx +++ b/src/components/manage/Blocks/DiscodataComponents/Text/View.jsx @@ -13,9 +13,13 @@ function isColor(strColor) { } const components = { - h1: (text, color, tooltip = false, tooltipText = '') => ( + bold: (bold, text) => { + if (bold) return {text}; + return text; + }, + h1: (text, bold, color, tooltip = false, tooltipText = '') => (

- {text} + {components.bold(bold, text)} {tooltip && tooltipText ? ( @@ -25,19 +29,19 @@ const components = { )}

), - h2: (text, color) => ( + h2: (text, bold, color) => (

- {text} + {components.bold(bold, text)}

), - h3: (text, color) => ( + h3: (text, bold, color) => (

- {text} + {components.bold(bold, text)}

), - p: (text, color) => ( + p: (text, bold, color) => (

- {text} + {components.bold(bold, text)}

), link: (text, internalLink, linkTarget, link, color) => { @@ -71,6 +75,7 @@ const View = ({ content, ...props }) => { rightText = '', color = '#000', order = 'dq', + bold = false, } = data; const { isLink = false, @@ -211,6 +216,7 @@ const View = ({ content, ...props }) => { {textMayRender && components[component] ? components[component]( isLink ? renderLinks[triggerOn] : text, + bold, isColor(color) ? color : '#000', tooltip, tooltipText, diff --git a/src/components/manage/Blocks/DiscodataComponents/schema.jsx b/src/components/manage/Blocks/DiscodataComponents/schema.jsx index ff42b91..6916372 100644 --- a/src/components/manage/Blocks/DiscodataComponents/schema.jsx +++ b/src/components/manage/Blocks/DiscodataComponents/schema.jsx @@ -165,6 +165,7 @@ export const makeTextSchema = (props) => { 'rightText', 'color', 'component', + 'bold', ], }, { @@ -225,6 +226,10 @@ export const makeTextSchema = (props) => { ['p', 'Paragraph'], ], }, + bold: { + title: 'Bold', + type: 'boolean', + }, isLink: { title: 'Is link', type: 'boolean', diff --git a/src/components/manage/Blocks/DiscodataComponentsBlock/View.jsx b/src/components/manage/Blocks/DiscodataComponentsBlock/View.jsx index a30cb59..b145b70 100644 --- a/src/components/manage/Blocks/DiscodataComponentsBlock/View.jsx +++ b/src/components/manage/Blocks/DiscodataComponentsBlock/View.jsx @@ -196,12 +196,7 @@ const renderComponents = { .slice(0, maxElements); } const view = ( -
    +
      {items.map((value) => (