function makeUndoData(styles, targetObj) {
  const undoData = {
    object: targetObj,
    styles: {},
  };
  forEachOwnProperties(styles, (value, key) => {
    const undoValue = targetObj[key];
    undoData.styles[key] = undoValue;
  });

  return undoData;
}
Make undoData
@param {object} styles - text styles
@param {Component} targetObj - text component
@returns {object} - undo data