import styled from 'styled-components';

/**
 * Higher Order Component to have consistent logic of styling components
 * @param {*} WrappedComponent
 * @returns {*} styled wrapped component
 */
export default (WrappedComponent, styles) => {
  const StyledComponent = styled(WrappedComponent)`${styles};`;
  StyledComponent.defaultProps = WrappedComponent.defaultProps;
  return StyledComponent;
};
