import React from 'react';

export const FormStateGenerator = ({ value }) => {
  return (
    <div style={{ marginTop: '3rem' }}>
      <label style={{ fontFamily: 'Montserrat' }}>form state:</label>
      <pre
        style={{
          background: '#f3f3f3',
          padding: '.5rem',
        }}
      >
        {'{'}
        {Object.keys(value).map((param, index) => {
          return (
            <div style={{ marginLeft: '1rem' }} key={index}>{`${param} : ${
              typeof value[param] === 'string'
                ? "'" + value[param] + "'"
                : value[param]
            }`}</div>
          );
        })}
        {'}'}
      </pre>
    </div>
  );
};
