import { styled } from 'stitches.config' import Flex from 'components/primitives/Flex' import { ComponentPropsWithoutRef, ElementRef, forwardRef, ReactNode, } from 'react' import { CSS } from '@stitches/react' const StyledInput = styled('input', { all: 'unset', width: '100%', px: 16, py: 12, borderRadius: 8, fontFamily: '$body', fontSize: 16, color: '$gray12', backgroundColor: '$gray3', $$focusColor: '$colors$primary8', '&::placeholder': { color: '$gray10' }, '&:focus': { boxShadow: 'inset 0 0 0 2px $$focusColor' }, '&:disabled': { backgroundColor: '$gray2', color: '$gray9', }, '&::-webkit-outer-spin-button, &::-webkit-inner-spin-button': { '-webkit-appearance': 'none', margin: 0, }, '&[type=number]': { '-moz-appearance': 'textfield', }, }) const Input = forwardRef< ElementRef, ComponentPropsWithoutRef & { icon?: ReactNode containerCss?: CSS } >(({ children, icon, containerCss, ...props }, forwardedRef) => ( {icon && (
{icon}
)}
)) export default Input