Skip to content

Commit

Permalink
feat: 찐막임 ㄹㅇ
Browse files Browse the repository at this point in the history
  • Loading branch information
pepperdad committed May 19, 2024
1 parent 859da3c commit 2275187
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/record/Record.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ const Record: React.FC = () => {
<UploadFile type="file" accept="image/gif, image/jpeg, image/png" onChange={handleImg} />
{image && <ImagePreview src={image} alt="Uploaded Preview" />}
</ImgContainer>
<UploadBtn onClick={() => handleImageUpload(success)}>등록</UploadBtn>
<UploadBtn $image={!!image} onClick={() => handleImageUpload(success)}>
등록
</UploadBtn>
</RecordWrapper>
);
};
Expand Down Expand Up @@ -178,13 +180,13 @@ const ImagePreview = styled.img`
background: #e5e7eb;
`;

const UploadBtn = styled.button`
const UploadBtn = styled.button<{ $image: boolean }>`
width: 33.5rem;
height: 4.8rem;
justify-content: center;
align-items: center;
border-radius: 0.8rem;
background: #9ca3af;
background: ${({ theme, $image }) => ($image ? theme.color.main : '#e5e7eb')};
color: #fff;
font-family: Pretendard;
font-size: 1.6rem;
Expand Down

0 comments on commit 2275187

Please sign in to comment.