if (width && typeof width === 'string') {
      if (width.endsWith('%')) {
        const percent = (newWidth / parentSize.width) * 100;
        newWidth = `${percent}%`;
      } else if (width.endsWith('vw')) {