on-internet
← Community

React JS bold the text in between

Stack Overflow ·

In the below code, I would like to style only some words for chartDesc (for example "the payback period"). Either bold or italic etc. Tried regular expressions, did not work. Please help! import React from 'react'; import Pie from './Pie'; import TextTruncate from 'react-text-truncate'; import ReactTooltip from 'react-tooltip'; import { browserHistory } from 'react-router'; export default class Donutchart extends React.Component { constructor(props) { super(); } getElements(id) { let backendData = this.props.data; let width = 120; let height = 120; let radius = Math.min(width, height) / 2; let

Comments

Sign in or sign up to comment and upvote.

No comments yet.