{"size": 1139, "ext": "js", "max_stars_repo_path": "src/components/styles/InputNumber.styled.js", "max_stars_repo_name": "0biguan/Budget-App", "max_stars_repo_stars_event_min_datetime": "2022-01-19T12:30:14.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-19T12:30:14.000Z", "max_issues_repo_path": "src/components/styles/InputNumber.styled.js", "max_issues_repo_name": "0biguan/Budget-App", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/styles/InputNumber.styled.js", "max_forks_repo_name": "0biguan/Budget-App", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.0, "max_line_length": 57, "alphanum_fraction": 0.5899912204}
import styled, { css } from "styled-components";

export const StyledInputNumber = styled.div`
  position: absolute;
  width: 300px;
  padding: 1.5em 0.8em;
  border: 5px solid black;
  border-radius: 10px;
  transform: scale(0);
  transform-origin: left top;
  opacity: 0;

  ${({ checked }) => checked && css`
    position: static;
    transform: scale(1);
    opacity: 1;
    transition: opacity .35s ease, transform 0.5s linear;
  ` }

  div {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5em 0;
  }

  label{
    margin-right: auto;
  }

  input {
    width: 30px;
    height: 35px;
    margin: 0 5px;
    padding: 0 0.5em;
    border: none;
  }

  /* Chrome, Safari, Edge, Opera */
  input::-webkit-outer-spin-button,
  input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Firefox */
  input[type="number"] {
    -moz-appearance: textfield;
  }

  img{
    width: 20px;
    margin-left: 10px;
    cursor:pointer;
  }

  @media (max-width: 1024px) {
    width:200px;

    label{
      font-size: 0.7rem;
    }
    input {
      width: 20px;
    }
  }
`