-
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.
Browse files
Browse the repository at this point in the history
룰렛 채팅 페이지 당첨자 배너 UI 개발
- Loading branch information
Showing
8 changed files
with
123 additions
and
36 deletions.
There are no files selected for viewing
Binary file added
BIN
+264 KB
frontend/src/common/assets/fonts/PartialSansKR/PartialSansKR-Regular.otf
Binary file not shown.
Binary file added
BIN
+116 KB
frontend/src/common/assets/fonts/PartialSansKR/PartialSansKR-Regular.woff2
Binary file not shown.
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
36 changes: 36 additions & 0 deletions
36
frontend/src/pages/Chatting/ChattingRoomPage/components/LooserBanner/LooserBanner.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,36 @@ | ||
import { css, Theme } from '@emotion/react'; | ||
|
||
export const bannerContainer = ({ theme }: { theme: Theme }) => css` | ||
overflow: hidden; /* 텍스트가 벗어나면 숨김 */ | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
height: 4.4rem; | ||
padding-bottom: 0.4rem; | ||
background-color: ${theme.colorPalette.black[100]}; | ||
`; | ||
|
||
export const bannerTextContainer = css` | ||
display: flex; /* 텍스트가 가로로 나란히 배치되도록 설정 */ | ||
white-space: nowrap; /* 텍스트가 한 줄로 유지되도록 설정 */ | ||
`; | ||
|
||
export const bannerText = ({ theme }: { theme: Theme }) => css` | ||
display: inline-block; | ||
font-size: 2rem; | ||
color: ${theme.colorPalette.white[100]}; | ||
${theme.typography.partialSansKR} | ||
animation: marquee 3s linear infinite; /* 애니메이션 설정 */ | ||
@keyframes marquee { | ||
0% { | ||
transform: translateX(0); /* 처음 상태 */ | ||
} | ||
100% { | ||
transform: translateX(-100%); /* 왼쪽 끝으로 이동 */ | ||
} | ||
} | ||
`; |
32 changes: 32 additions & 0 deletions
32
frontend/src/pages/Chatting/ChattingRoomPage/components/LooserBanner/LooserBanner.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,32 @@ | ||
import { BetChatRoomDetail } from '@_types/index'; | ||
import { useTheme } from '@emotion/react'; | ||
import * as S from './LooserBanner.style'; | ||
|
||
interface LooserBannerProps { | ||
chatRoomDetail: BetChatRoomDetail; | ||
} | ||
|
||
export default function LooserBanner(props: LooserBannerProps) { | ||
const { chatRoomDetail } = props; | ||
|
||
const theme = useTheme(); | ||
|
||
return ( | ||
<div css={S.bannerContainer({ theme })}> | ||
<div css={S.bannerTextContainer}> | ||
<span css={S.bannerText({ theme })}> | ||
축하드립니다 {chatRoomDetail.attributes.loser.nickname}님! | ||
</span> | ||
<span css={S.bannerText({ theme })}> | ||
축하드립니다 {chatRoomDetail.attributes.loser.nickname}님! | ||
</span> | ||
<span css={S.bannerText({ theme })}> | ||
축하드립니다 {chatRoomDetail.attributes.loser.nickname}님! | ||
</span> | ||
<span css={S.bannerText({ theme })}> | ||
축하드립니다 {chatRoomDetail.attributes.loser.nickname}님! | ||
</span> | ||
</div> | ||
</div> | ||
); | ||
} |