style: Change input tag style
This commit is contained in:
parent
360666045d
commit
5f8eb4897f
@ -1,3 +1,4 @@
|
|||||||
|
import { Input } from '../../styles/Common.styles';
|
||||||
import * as S from '../../styles/CurrencyInput.styles';
|
import * as S from '../../styles/CurrencyInput.styles';
|
||||||
|
|
||||||
function CurrencyInput({ value, setValue, autofocus }) {
|
function CurrencyInput({ value, setValue, autofocus }) {
|
||||||
@ -24,7 +25,8 @@ function CurrencyInput({ value, setValue, autofocus }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<S.CurrencyInput>
|
<S.CurrencyInput>
|
||||||
<S.CurrencyInputField
|
<Input
|
||||||
|
type="text"
|
||||||
value={getRenderValue()}
|
value={getRenderValue()}
|
||||||
onChange={handleOnChange}
|
onChange={handleOnChange}
|
||||||
placeholder="가격을 입력해주세요"
|
placeholder="가격을 입력해주세요"
|
||||||
|
@ -17,3 +17,24 @@ export const SubTitle = styled.h2`
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const Input = styled.input`
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: ${({ theme }) => theme.colors.gray900};
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:placeholder-shown {
|
||||||
|
caret-color: ${({ theme }) => theme.colors.primary};
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
@ -5,26 +5,8 @@ export const CurrencyInput = styled.div`
|
|||||||
${({ theme }) => theme.hoverBorder};
|
${({ theme }) => theme.hoverBorder};
|
||||||
${({ theme }) => theme.activeTransform};
|
${({ theme }) => theme.activeTransform};
|
||||||
padding: 0;
|
padding: 0;
|
||||||
`;
|
|
||||||
|
|
||||||
export const CurrencyInputField = styled.input.attrs({ type: 'text' })`
|
& > input {
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: ${({ theme }) => theme.colors.gray900};
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
caret-color: transparent;
|
caret-color: transparent;
|
||||||
border: none;
|
|
||||||
|
|
||||||
&:focus,
|
|
||||||
&:active {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:placeholder-shown {
|
|
||||||
caret-color: ${({ theme }) => theme.colors.primary};
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user