Skip to content

Commit

Permalink
#32 refactor: label, supporting text 위치수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongbowoon committed Jul 8, 2024
1 parent f1c01fd commit c0cbac3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 5 additions & 1 deletion src/common/component/Input/Input.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ export const containerStyle = css({
display: 'flex',
flexDirection: 'column',

gap: '1.2rem',
gap: '0.8rem',

width: '100%',

'& > div': {
marginTop: '0.4rem',
},
});

export const inputSupportStyle = css({
Expand Down
18 changes: 8 additions & 10 deletions src/common/component/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ const Input = (
return (
<article css={containerStyle}>
{label && <Label id={label}>{label}</Label>}
<div css={inputSupportStyle}>
<div css={[warpperStyle, variantStyle({ variant, isError }), sizeStyle(size)]}>
{LeftIcon && <LeftIcon />}
<input ref={ref} css={inputStyle} {...props} />
</div>
{supportingText && (
<SupportingText isError={isError} isNotice={isNotice}>
{supportingText}
</SupportingText>
)}
<div css={[warpperStyle, variantStyle({ variant, isError }), sizeStyle(size)]}>
{LeftIcon && <LeftIcon />}
<input ref={ref} css={inputStyle} {...props} />
</div>
{supportingText && (
<SupportingText isError={isError} isNotice={isNotice}>
{supportingText}
</SupportingText>
)}
</article>
);
};
Expand Down

0 comments on commit c0cbac3

Please sign in to comment.