import styled, { css } from "styled-components";

import { Input } from "../../base";
import { theme, getPadding } from "../../styled-config";

const padding = () => {
  return css`
    padding: ${(props) => getPadding(props, "formControl", "filePadding")};
  `;
};

const styleFormControleFile = (props) => css`
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  ${padding(props)};
`;

const FormControlFile = styled(Input)`
  ${(props) => styleFormControleFile(props)};
`;

FormControlFile.defaultProps = {
  theme,
};

export { FormControlFile };
