export const convertModifiersToClassnames = (modifiers, theme) => {
  if (!modifiers) {
    return;
  }

  const convertedModifiers = {};

  Object.keys(modifiers).forEach(key => {
    convertedModifiers[theme[key]] = modifiers[key];
  });

  return convertedModifiers;
};

export const convertModifiersToClassnames = (modifiers, theme) => {
  if (!modifiers) {
    return;
  }

  return Object.keys(modifiers).reduce((convertedModifiers, key) => {
    return {
      ...convertedModifiers,
      [theme[key]]: modifiers[key],
    };
  }, {});
};

Use reduce instead of forEach
Use reduce instead of forEach
