import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Background from '../../Background';

import './form-wrapper.scss';

const propTypes = {
  padding: PropTypes.bool,
  backgroundColor: PropTypes.string,
  className: PropTypes.string
};

const defaultProps = {
  padding: false,
  backgroundColor: 'white',
  className: undefined
};

const FormWrapper = ({ padding, className, ...props }) => (
  <Background
    className={className}
    styleName={classNames({ padding })}
    {...props}
    component="form"
  />
);

FormWrapper.propTypes = propTypes;
FormWrapper.defaultProps = defaultProps;

export default FormWrapper;
