Skip to content

Commit

Permalink
๐Ÿ’„ย Style: ํƒ€์ด๋จธ ์ƒํƒœ์— ๋”ฐ๋ฅธ ํ…Œ๋‘๋ฆฌ ์ƒ‰ ๋ณ€๊ฒฝ ์Šคํƒ€์ผ ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
๐Ÿ’„ย Style: ํƒ€์ด๋จธ ์ƒํƒœ์— ๋”ฐ๋ฅธ ํ…Œ๋‘๋ฆฌ ์ƒ‰ ๋ณ€๊ฒฝ ์Šคํƒ€์ผ ์ถ”๊ฐ€
  • Loading branch information
sscoderati authored Sep 26, 2023
2 parents 533bbc5 + 89ae240 commit 81d7ec2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/pages/meditation/components/MeditationTimer.style.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import styled from '@emotion/styled';

export const TimerContainer = styled.div`
export const TimerContainer = styled.div<{ timerPaused: boolean }>`
${({ theme }) => theme.style.flexCenter};
width: 170px;
height: 170px;
border-radius: 50%;
background: ${({ theme }) => theme.color.linearGradientPurpleVivid};
background: ${({ theme, timerPaused }) =>
timerPaused
? theme.color.linearGradientGreyVivid
: theme.color.linearGradientPurpleVivid};
margin-top: 100px;
`;

export const TimerElement = styled.button`
export const TimerElement = styled.button<{ timerPaused: boolean }>`
${({ theme }) => theme.style.flexCenter};
border: none;
outline: none;
Expand All @@ -18,7 +21,8 @@ export const TimerElement = styled.button`
height: 150px;
border-radius: 50%;
background-color: #211730;
color: ${({ theme }) => theme.color.white};
color: ${({ theme, timerPaused }) =>
timerPaused ? theme.color.greyLight : theme.color.white};
font-size: 1.5rem;
font-weight: bold;
&:hover {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/meditation/components/MeditationTimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ const MeditationTimer = () => {
};

return (
<TimerContainer>
<TimerContainer timerPaused={timerId && paused}>
<TimerElement
timerPaused={timerId && paused}
onClick={() => toggleTimer()}
onMouseOver={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
Expand Down
1 change: 1 addition & 0 deletions src/styles/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ export const color = {
linearGradientPurple:
'linear-gradient(160deg, #2a2427 0%, #47346d 50%, #7e4ea4 75%, #b796d0 100%)',
linearGradientPurpleVivid: `linear-gradient(90deg, #47346d 0%, #5e12ff 100%)`,
linearGradientGreyVivid: `linear-gradient(90deg, #3e3e3e 0%, #b3b3b3 100%)`,
transparentGreyBackground: 'rgba(126, 126, 126, 0.5)'
};

0 comments on commit 81d7ec2

Please sign in to comment.