UNPKG

@mui/x-charts

Version:

The community edition of the charts components (MUI X).

15 lines 437 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { getStringSize } from './domUtils'; export function getWordsByLines(_ref) { var style = _ref.style, needsComputation = _ref.needsComputation, text = _ref.text; return text.split('\n').map(function (subText) { return _extends({ text: subText }, needsComputation ? getStringSize(subText, style) : { width: 0, height: 0 }); }); }