Skip to content

Commit 3868f18

Browse files
committed
πŸ’„ design: (FE) - RoundButton 적용
1 parent bd83776 commit 3868f18

File tree

7 files changed

+32
-56
lines changed

7 files changed

+32
-56
lines changed

β€Žfrontend/src/components/@shared/RoundButton/RoundButton.style.tsβ€Ž

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { css } from '@emotion/react';
2+
import theme from '@styles/theme';
23

34
export const roundButtonStyle = (style) => css`
45
display: flex;
@@ -9,7 +10,11 @@ export const roundButtonStyle = (style) => css`
910
width: ${style.width}px;
1011
height: ${style.height}px;
1112
border-radius: ${style.height / 2}px;
12-
background-color: ${style.backgroundColor};
13+
background-color: ${style.backgroundColor || theme.colors.primary};
1314
color: ${style.color || 'white'};
1415
font-size: ${style.fontsize || '24px'};
16+
17+
&:hover {
18+
filter: ${style.color === 'black' ? `brightness(200%)` : `brightness(110%)`};
19+
}
1520
`;

β€Žfrontend/src/pages/Feedback/Feedback.style.tsβ€Ž

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ export const feedbackContainerStyle = css`
1717
margin: auto;
1818
`;
1919

20-
export const feedbackSyncBtnStyle = (theme, isFbSync) => css`
21-
background-color: ${isFbSync ? theme.colors.primary : theme.colors.white};
22-
width: 50px;
23-
height: 50px;
24-
border-radius: 50%;
25-
display: 'flex';
26-
justify-content: 'center';
27-
align-items: 'center';
28-
`;
29-
3020
export const feedbackAreaStyle = css`
3121
display: flex;
3222
flex-direction: column;

β€Žfrontend/src/pages/Feedback/Feedback.tsxβ€Ž

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ import { completedFbCntState, docsUUIDState } from '@store/interview.store';
1515

1616
import { ReactComponent as LinkIcon } from '@assets/icon/link.svg';
1717
import { socket } from '../../service/socket';
18-
import {
19-
feedbackWrapperStyle,
20-
feedbackContainerStyle,
21-
feedbackAreaStyle,
22-
feedbackSyncBtnStyle,
23-
} from './Feedback.style';
18+
import { feedbackWrapperStyle, feedbackContainerStyle, feedbackAreaStyle } from './Feedback.style';
2419
import { PAGE_TYPE } from '@constants/page.constant';
2520
import theme from '@styles/theme';
2621
import { iconBgStyle } from '@styles/commonStyle';
@@ -78,30 +73,32 @@ const Feedback = () => {
7873
const finishFeedbackBtn = (
7974
<RoundButton
8075
style={{
81-
backgroundColor: theme.colors.primary,
82-
width: 200,
76+
width: 160,
8377
height: 50,
84-
color: theme.colors.white,
8578
}}
8679
onClick={handleEndFeedback}
8780
>
88-
<div>ν”Όλ“œλ°± μ’…λ£Œ</div>
81+
<span>ν”Όλ“œλ°± μ’…λ£Œ</span>
8982
</RoundButton>
9083
);
9184

9285
return (
9386
<div css={feedbackWrapperStyle}>
9487
<div css={feedbackContainerStyle}>
9588
<IntervieweeVideo src={videoUrl} width={400} autoplay muted controls />
96-
<button
97-
css={(theme) => feedbackSyncBtnStyle(theme, isFbSync)}
89+
<RoundButton
90+
style={{
91+
width: 50,
92+
height: 50,
93+
backgroundColor: isFbSync ? theme.colors.primary : theme.colors.white,
94+
}}
9895
onClick={() => setIsFbSync((current) => !current)}
9996
>
10097
<LinkIcon
10198
{...iconBgStyle}
10299
fill={isFbSync ? theme.colors.white : theme.colors.primary}
103100
/>
104-
</button>
101+
</RoundButton>
105102
<div css={feedbackAreaStyle}>
106103
<FeedbackList feedbackList={feedbackList} editable />
107104
<FeedbackForm />

β€Žfrontend/src/pages/Interviewee/Interviewee.tsxβ€Ž

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import IntervieweeVideo from '@components/IntervieweeVideo/IntervieweeVideo';
66
import Video from '@components/@shared/Video/Video';
77
import useSafeNavigate from '@hooks/useSafeNavigate';
88
import usePreventLeave from '@hooks/usePreventLeave';
9-
import { webRTCStreamSelector, webRTCUserMapState } from '@store/webRTC.store';
9+
import { webRTCStreamSelector } from '@store/webRTC.store';
1010
import { currentVideoTimeState } from '@store/currentVideoTime.store';
1111
import { docsUUIDState, userRoleSelector } from '@store/interview.store';
1212

@@ -20,15 +20,13 @@ import { DocsReqDtoType } from '@customType/dto';
2020
import { intervieweeWrapperStyle } from './Interviewee.style';
2121
import BottomBar from '@components/BottomBar/BottomBar';
2222
import RoundButton from '@components/@shared/RoundButton/RoundButton';
23-
import theme from '@styles/theme';
2423

2524
const Interviewee = () => {
2625
usePreventLeave();
2726
const { safeNavigate } = useSafeNavigate();
2827
const { startStream, stopStream } = mediaStreamer();
2928

3029
const { interviewee, interviewerList } = useRecoilValue(userRoleSelector);
31-
const webRTCUserMap = useRecoilValue(webRTCUserMapState);
3230
const currentVideoTime = useRecoilValue(currentVideoTimeState);
3331
const streamList = useRecoilValue(webRTCStreamSelector);
3432
const setDocsUUID = useSetRecoilState(docsUUIDState);
@@ -74,14 +72,12 @@ const Interviewee = () => {
7472
const endInterviewBtn = (
7573
<RoundButton
7674
style={{
77-
backgroundColor: theme.colors.primary,
78-
width: 200,
75+
width: 160,
7976
height: 50,
80-
color: theme.colors.white,
8177
}}
8278
onClick={hadleEndInterview}
8379
>
84-
<div>λ©΄μ ‘ μ’…λ£Œ</div>
80+
<span>λ©΄μ ‘ μ’…λ£Œ</span>
8581
</RoundButton>
8682
);
8783

β€Žfrontend/src/pages/Interviewer/Interviewer.tsxβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,12 @@ const Interviewer = () => {
4848
const endInterviewBtn = (
4949
<RoundButton
5050
style={{
51-
backgroundColor: theme.colors.primary,
52-
width: 200,
51+
width: 160,
5352
height: 50,
54-
color: theme.colors.white,
5553
}}
5654
onClick={hadleEndInterview}
5755
>
58-
<div>λ©΄μ ‘ μ’…λ£Œ</div>
56+
<span>λ©΄μ ‘ μ’…λ£Œ</span>
5957
</RoundButton>
6058
);
6159

β€Žfrontend/src/pages/Lobby/Lobby.style.tsβ€Ž

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@ export const lobbyWrapperStyle = (theme) => css`
66
background-color: ${theme.colors.tertiary};
77
`;
88

9-
export const startInterviewBtnStyle = (theme) => css`
10-
box-sizing: border-box;
11-
background-color: ${theme.colors.primary};
12-
width: 200px;
13-
height: 50px;
14-
border-radius: 36px;
15-
display: flex;
16-
justify-content: space-between;
17-
align-items: center;
18-
padding: 0px 30px;
19-
20-
div {
21-
color: white;
22-
font-size: 24px;
23-
}
24-
`;
25-
269
export const VideoAreaStyle = () => css`
2710
display: flex;
2811
justify-content: center;

β€Žfrontend/src/pages/Lobby/Lobby.tsxβ€Ž

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import { UserType } from '@customType/user';
1616
import { SOCKET_EVENT_TYPE } from '@constants/socket.constant';
1717
import { PAGE_TYPE } from '@constants/page.constant';
1818
import { iconBgStyle } from '@styles/commonStyle';
19-
import { lobbyWrapperStyle, startInterviewBtnStyle, VideoAreaStyle } from './Lobby.style';
19+
import { lobbyWrapperStyle, VideoAreaStyle } from './Lobby.style';
2020
import { ReactComponent as BroadcastIcon } from '@assets/icon/broadcast.svg';
21+
import RoundButton from '@components/@shared/RoundButton/RoundButton';
2122

2223
interface joinInterviewResponseType {
2324
usersInRoom: UserType[];
@@ -81,10 +82,16 @@ const Lobby = () => {
8182
};
8283

8384
const startInterviewBtn = (
84-
<button css={startInterviewBtnStyle} onClick={handleStartInterviewee}>
85+
<RoundButton
86+
onClick={handleStartInterviewee}
87+
style={{
88+
width: 180,
89+
height: 50,
90+
}}
91+
>
8592
<BroadcastIcon {...iconBgStyle} />
86-
<div>λ©΄μ ‘ μ‹œμž‘</div>
87-
</button>
93+
<span>λ©΄μ ‘ μ‹œμž‘</span>
94+
</RoundButton>
8895
);
8996

9097
return (

0 commit comments

Comments
Β (0)