Skip to content

Commit 81d7ec2

Browse files
authored
๐Ÿ’„ย Style: ํƒ€์ด๋จธ ์ƒํƒœ์— ๋”ฐ๋ฅธ ํ…Œ๋‘๋ฆฌ ์ƒ‰ ๋ณ€๊ฒฝ ์Šคํƒ€์ผ ์ถ”๊ฐ€
๐Ÿ’„ย Style: ํƒ€์ด๋จธ ์ƒํƒœ์— ๋”ฐ๋ฅธ ํ…Œ๋‘๋ฆฌ ์ƒ‰ ๋ณ€๊ฒฝ ์Šคํƒ€์ผ ์ถ”๊ฐ€
2 parents 533bbc5 + 89ae240 commit 81d7ec2

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

โ€Žsrc/pages/meditation/components/MeditationTimer.style.tsโ€Ž

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import styled from '@emotion/styled';
22

3-
export const TimerContainer = styled.div`
3+
export const TimerContainer = styled.div<{ timerPaused: boolean }>`
44
${({ theme }) => theme.style.flexCenter};
55
width: 170px;
66
height: 170px;
77
border-radius: 50%;
8-
background: ${({ theme }) => theme.color.linearGradientPurpleVivid};
8+
background: ${({ theme, timerPaused }) =>
9+
timerPaused
10+
? theme.color.linearGradientGreyVivid
11+
: theme.color.linearGradientPurpleVivid};
912
margin-top: 100px;
1013
`;
1114

12-
export const TimerElement = styled.button`
15+
export const TimerElement = styled.button<{ timerPaused: boolean }>`
1316
${({ theme }) => theme.style.flexCenter};
1417
border: none;
1518
outline: none;
@@ -18,7 +21,8 @@ export const TimerElement = styled.button`
1821
height: 150px;
1922
border-radius: 50%;
2023
background-color: #211730;
21-
color: ${({ theme }) => theme.color.white};
24+
color: ${({ theme, timerPaused }) =>
25+
timerPaused ? theme.color.greyLight : theme.color.white};
2226
font-size: 1.5rem;
2327
font-weight: bold;
2428
&:hover {

โ€Žsrc/pages/meditation/components/MeditationTimer.tsxโ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ const MeditationTimer = () => {
5252
};
5353

5454
return (
55-
<TimerContainer>
55+
<TimerContainer timerPaused={timerId && paused}>
5656
<TimerElement
57+
timerPaused={timerId && paused}
5758
onClick={() => toggleTimer()}
5859
onMouseOver={() => setHovered(true)}
5960
onMouseLeave={() => setHovered(false)}

โ€Žsrc/styles/colors.tsโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ export const color = {
2727
linearGradientPurple:
2828
'linear-gradient(160deg, #2a2427 0%, #47346d 50%, #7e4ea4 75%, #b796d0 100%)',
2929
linearGradientPurpleVivid: `linear-gradient(90deg, #47346d 0%, #5e12ff 100%)`,
30+
linearGradientGreyVivid: `linear-gradient(90deg, #3e3e3e 0%, #b3b3b3 100%)`,
3031
transparentGreyBackground: 'rgba(126, 126, 126, 0.5)'
3132
};

0 commit comments

Comments
ย (0)