diff --git a/src/components/common/Input/index.tsx b/src/components/common/Input/index.tsx index 28e71169..13382ae9 100644 --- a/src/components/common/Input/index.tsx +++ b/src/components/common/Input/index.tsx @@ -1,4 +1,5 @@ import styled from '@emotion/styled' +import React, { ForwardedRef } from 'react' type InputProps = { placeholder?: string @@ -12,25 +13,32 @@ type InputProps = { inputTextSize?: string inputBackgroundColor?: string borderRadius?: string + onChange?: (e: React.ChangeEvent) => void } -const Input = ({ - placeholder, - placeholderSize, - placeholderColor, - width, - height, - borderColor, - borderWidth, - borderRadius, - inputTextColor, - inputTextSize, - inputBackgroundColor, -}: InputProps) => { - return ( - <> - - , + ) => { + return ( + + - - - ) -} + /> + + ) + }, +) +Input.displayName = 'Input' -const InputWrapper = styled.div` +const StyledInputWrapper = styled.div` position: relative; ` -const StyleInput = styled.input` +const StyledInput = styled.input` ::placeholder { font-size: ${(props) => props.placeholderSize}; color: ${(props) => props.placeholderColor}; } - position: relative; - placeholder: ${(props) => props.placeholder}; width: ${(props) => props.width}; height: ${(props) => props.height}; border-color: ${(props) => props.borderColor}; @@ -67,6 +74,7 @@ const StyleInput = styled.input` background-color: ${(props) => props.inputBackgroundColor}; border-radius: ${(props) => props.borderRadius}; font-size: ${(props) => props.inputTextSize}; + position: relative; ` export default Input