-
Notifications
You must be signed in to change notification settings - Fork 0
[OD-201] 스켈레톤 UI 컴포넌트화 및 Profile/Account/Post 적용 #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e503eaf
Feat: 스켈레톤 ui 컴포넌트화
lalaurrel b0f2184
Feat: 애니메이션 추가
lalaurrel f19e394
Refactor: 로딩중 제거 후 스켈레톤 적용(프로필)
lalaurrel 7921a8a
Fix: 불필요한 주석 삭제
lalaurrel a09ee4d
Fix: 버튼 조정
lalaurrel 3ccc62d
Fix: 스켈레톤 포스트 4개로 증가
lalaurrel ba8b981
Fix: ui 수정
lalaurrel d9c742f
Fix: rem으로 수정
lalaurrel d74aaaa
FIx: 스타일 분리
lalaurrel 469d80c
Fix: 스타일시트로 분리
lalaurrel bf74952
Fix: 스타일 삭제
lalaurrel 25a8734
Fix: 보더 둥글게 처리
lalaurrel 236f5af
Fix: 스타일 분리
lalaurrel 3f0aa01
Refactor: profileEdit 스켈레톤 적용
lalaurrel af367dd
Refactor: AccountSetting 스켈레톤 적용
lalaurrel c60e366
Refactor: 회원탈퇴 스켈레톤 임시적용
lalaurrel f35fc1e
Fix: 사소한 UI 수정
lalaurrel 22b5dbc
Refactor: post에 스켈레톤 적용
lalaurrel ac91e1e
Fix: 로딩타임 수정
lalaurrel 1d329a2
Fix: 스켈레톤 rem으로 변경
lalaurrel 2b5d4ba
Fix: rem으로 변환
lalaurrel a0a79f6
Merge branch 'dev' into feat/OD-201
lalaurrel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { SkeletonContainer } from './styles'; | ||
|
|
||
| interface SkeletonProps { | ||
| width?: string | number; | ||
| height?: string | number; | ||
| borderRadius?: string | number; | ||
| className?: string; | ||
| style?: React.CSSProperties; | ||
| } | ||
|
|
||
| const Skeleton: React.FC<SkeletonProps> = ({ | ||
| width = '100%', | ||
| height = '16px', | ||
| borderRadius = '5px', | ||
| className = '', | ||
| }) => { | ||
| // width와 height가 숫자인 경우 rem 단위를 추가 | ||
| const getSize = (size: string | number) => { | ||
| if (typeof size === 'number') { | ||
| return `${size}px`; | ||
| } | ||
| return size; | ||
| }; | ||
|
|
||
| return ( | ||
| <SkeletonContainer | ||
| className={className} | ||
| style={{ | ||
| width: getSize(width), | ||
| height: getSize(height), | ||
| borderRadius: getSize(borderRadius), | ||
| }} | ||
| /> | ||
| ); | ||
| }; | ||
|
|
||
| export default Skeleton; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { styled } from 'styled-components'; | ||
|
|
||
| export const SkeletonContainer = styled.div` | ||
| background-color: #e0e0e0; | ||
| position: relative; | ||
| overflow: hidden; | ||
| background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%); | ||
| background-size: 200% 100%; | ||
| animation: shimmer 1.5s infinite; | ||
|
|
||
| @keyframes shimmer { | ||
| 0% { | ||
| background-position: 200% 0; | ||
| } | ||
| 100% { | ||
| background-position: -200% 0; | ||
| } | ||
| } | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,21 @@ | ||
| import { styled } from 'styled-components'; | ||
|
|
||
| export const InputLayout = styled.div` | ||
| export const InfoWrapper = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: center; | ||
| flex-direction: row; | ||
| align-items: left; | ||
| `; | ||
|
|
||
| export const PicWrapper = styled.div` | ||
| margin-left: 47px; | ||
| `; | ||
|
|
||
| export const NameWrapper = styled.div` | ||
| margin-left: 10px; | ||
| margin-top: 10px; | ||
| `; | ||
|
|
||
| textarea { | ||
| display: block; | ||
| width: calc(100% - 3rem); | ||
| height: 5.75rem; | ||
| border-radius: 0.125rem; | ||
| border: 0.0625rem solid ${({ theme }) => theme.colors.gray[600]}; | ||
| margin-bottom: 5.875rem; | ||
| z-index: 2; | ||
| margin-top: -3.75rem; | ||
| outline: none; | ||
| padding: 0.8125rem 0.9375rem; | ||
| font-family: 'Pretendard Variable'; | ||
| font-size: 1rem; | ||
| font-style: normal; | ||
| font-weight: 300; | ||
| line-height: 150%; | ||
| color: ${({ theme }) => theme.colors.text.primary}; | ||
| resize: none; | ||
| } | ||
| export const PostWrapper = styled.div` | ||
| margin-top: 10px; | ||
| padding-inline: 30px; | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
주석에는 숫자인 경우 rem 단위를 추가한다고 되어 있는데 코드는 px로 반환하고 있는 것 같네요! 충돌 해결하면서 함께 수정하면 좋을 것 같습니다. 스켈레톤 너무 예쁘게 나왔군요. . . 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 애초에 props로 받기를 rem 단위로 받는 거군요?... 사용에 유의해야겠습니다... 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다!😊