Skip to content

Commit

Permalink
fix: #173 프로필 컴포넌트 width,height 받아온 값으로 고정
Browse files Browse the repository at this point in the history
  • Loading branch information
Oh5Yeonju committed Oct 7, 2023
1 parent 20f9b38 commit 3e307b0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/common/User/UserProfileCircle.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import styled from "styled-components";
import basicImg from '../../../assets/images/basic-profile-img.png';

const UserProfileCircle = () => {
const UserProfileCircle = ({isWidth}) => {
return (
<UserProfileCircleStyle style={{ backgroundImage: `url(${basicImg})`}}>
<UserProfileCircleStyle isWidth={isWidth} style={{ backgroundImage: `url(${basicImg})`}}>
</UserProfileCircleStyle>
)
}

export default UserProfileCircle;

const UserProfileCircleStyle = styled.div`
width: 100%;
aspect-ratio: 1/1;
width: ${({isWidth}) => (isWidth ? isWidth : '100%')};
height: ${({isWidth}) => isWidth};
border-radius: 50%;
background-size: cover;
`

0 comments on commit 3e307b0

Please sign in to comment.