-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feat] 쇼케이스 페이지 club profile card 구현 #52
Merged
Merged
Changes from 11 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c1d2e5c
#47 feat:club profile card 초기 세팅
34dab33
#47 fix: style props 객체 변경
b3f3a80
#47 feat: 기본스타일 설정
140db1d
#47 feat: default image 추가
e445c40
#47 feat: image svg 컴포넌트 설정
0f5ac2f
#47 feat:storybook 설정
69028fd
#47 fix: 주석 삭제
95b9563
Merge branch 'develop' of https://github.com/Team-Tiki/TIKI_CLIENT in…
d854eeb
#47 fix: daysection build 에러 수정
fc7ffc8
#47 fix: 주석처리
9f92bca
#47 fix: css 순서 변경
00de606
#47 refactor:storybook 추가
103520c
#47 refactor: image url 수정
f0c3a59
#47 refactor: style 리팩토링
3dc4c87
#47 fix: Text 공통 컴포넌트 style 추가
2021310
#53 feat: tag 변경
bdbb0ad
#47 fix: 주석 정리
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
30 changes: 30 additions & 0 deletions
30
src/page/showcase/component/ClubProfileCard/ClubProfileCard.style.ts
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,30 @@ | ||
import { css } from '@emotion/react'; | ||
|
||
import { theme } from '@/common/style/theme/theme'; | ||
|
||
export const imageStyle = css({ | ||
width: '100%', | ||
height: '14rem', | ||
|
||
borderRadius: '16px 16px 0px 0px', | ||
}); | ||
|
||
export const descriptionStyle = css({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: '0.6rem', | ||
|
||
padding: '1.6rem', | ||
}); | ||
|
||
export const titleStyle = css({ | ||
...theme.heading.heading06, | ||
}); | ||
|
||
export const detailStyle = css({ | ||
height: '3.4rem', | ||
|
||
...theme.text.body07, | ||
|
||
overflow: 'hidden', | ||
}); |
26 changes: 26 additions & 0 deletions
26
src/page/showcase/component/ClubProfileCard/ClubProfileCard.tsx
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,26 @@ | ||
import { | ||
descriptionStyle, | ||
detailStyle, | ||
imageStyle, | ||
titleStyle, | ||
} from '@/page/showcase/component/ClubProfileCard/ClubProfileCard.style'; | ||
|
||
interface ClubProfileCardProps { | ||
title: string; | ||
detail: string; | ||
Image: React.FunctionComponent<React.SVGProps<SVGSVGElement>>; | ||
} | ||
|
||
const ClubProfileCard = ({ title, detail, Image }: ClubProfileCardProps) => { | ||
return ( | ||
<> | ||
<Image css={imageStyle} /> | ||
<div css={descriptionStyle}> | ||
<p css={titleStyle}>{title}</p> | ||
<p css={detailStyle}>{detail}</p> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default ClubProfileCard; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import ClubProfileCard from '@/page/showcase/component/ClubProfileCard/ClubProfileCard'; | ||
import Image from '@/page/showcase/constant/empty.svg?react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
const meta = { | ||
title: 'Page/ClubProfileCard', | ||
component: ClubProfileCard, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
args: { | ||
title: 'Tiki 티키', | ||
detail: '안녕하세요 티키입니다. 저희는 멋진 웹사이트를 제작합니다.', | ||
Image: Image, | ||
}, | ||
argTypes: {}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. argTypes: {
title: {
control: {
type: 'text',
},
},
detail: {
control: {
type: 'text',
},
},
}, 요런식으로 컨트롤 타입도 지정해주면 스토리북을 더 잘 활용할 수 있을 것 같아요 ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오호라 감사합니다!! |
||
} satisfies Meta<typeof ClubProfileCard>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; |
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.
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.
카드에서
img
로 활용할 녀석들은svg
가 아니라png
혹은jpg
가 될 것 같아서 이렇게svgr
컴포넌트를 넘겨주는게 아니라imgUrl
을 넘겨주도록 구현하는게 맞을 것 같아요 !prop
으로 이미지 url을 가져오고,img
태그를 활용하여src
속성에 대입해주는 것이 올바를 것 같습니다.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.
img
태그를 활용하는 과정에서, 최상위 컨테이너 요소를width
100%를 적용한 후 그 안에서img
태그는width
백퍼,object-fit
적용,aspect-ratio
를 활용한 레이아웃 시프트 방지 등을 적용하면 좋을 것 같습니다.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.
맞네요...svg로 받아오는 걸 체크 못했는데 역시 주용님 !
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.
넵! 적용했습니다 ~ 👍