-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
템플릿 카드의 클릭 가능 영역 변경 및 유저 이름 클릭 시 유저 페이지로 이동 (#870)
* refactor(TemplateCard): 유저 정보 클릭 가능하도록 변경, 템플릿 카드 클릭 범위 감소 * refactor(TemplatePage): 상세조회 페이지 유저 버튼 스타일 변경 * refactor(AuthorInfo): AuthorInfo를 공통 컴포넌트로 분리
- Loading branch information
1 parent
26744a7
commit e602bce
Showing
8 changed files
with
85 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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,32 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import { theme } from '@/style/theme'; | ||
|
||
export const AuthorInfoContainer = styled.div` | ||
cursor: pointer; | ||
display: flex; | ||
gap: 0.25rem; | ||
align-items: center; | ||
box-sizing: border-box; | ||
min-width: 0; | ||
height: 100%; | ||
padding: 3px 5px; | ||
border-radius: 4px; | ||
&:hover { | ||
background-color: ${theme.color.light.primary_50}; | ||
} | ||
`; | ||
|
||
export const EllipsisTextWrapper = styled.span` | ||
overflow: hidden; | ||
display: block; | ||
min-width: 0; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
`; |
This file contains 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,20 @@ | ||
import { PersonIcon } from '@/assets/images'; | ||
import { Text } from '@/components'; | ||
import { theme } from '@/style/theme'; | ||
|
||
import * as S from './AuthorInfo.style'; | ||
|
||
interface Props { | ||
memberName: string; | ||
} | ||
|
||
const AuthorInfo = ({ memberName }: Props) => ( | ||
<S.AuthorInfoContainer> | ||
<PersonIcon width={17} height={17} color={theme.color.light.primary_500} /> | ||
<S.EllipsisTextWrapper> | ||
<Text.Small color={theme.color.light.primary_500}>{memberName}</Text.Small> | ||
</S.EllipsisTextWrapper> | ||
</S.AuthorInfoContainer> | ||
); | ||
|
||
export default AuthorInfo; |
This file contains 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 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 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 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 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 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