Skip to content

Commit

Permalink
๐Ÿ’„ ํƒ€์ด๋จธ +-๋ฒ„ํŠผ ๋ˆ„๋ฅด๊ณ  ์žˆ์œผ๋ฉด ๋ฒ„ํŠผ ์ƒ‰๊น”์ด ์ ์ฐจ ์ง„ํ•ด์ง
Browse files Browse the repository at this point in the history
์ƒ‰์ƒ์ฝ”๋“œ์— props๋ฅผ ๋„˜๊ฒจ์ค€ ํ›„ rgbaํ˜•ํƒœ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ๋ณ€๊ฒฝ
  • Loading branch information
alittlekitten committed Feb 23, 2022
1 parent fd00c6e commit 4c07401
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/components/Timer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ const Timer = () => {
setTime.current = null;
};

const playAlarm = () => {
const playAlarm = useCallback(() => {
alarm.play();
};
}, [alarm]);

useEffect(() => {
const cal = new Date(
Expand Down Expand Up @@ -221,7 +221,7 @@ const Timer = () => {

return (
<div css={totalContainer({ status, hour, minute, second })}>
<div css={watchContainer}>
<div css={watchContainer({ speed })}>
<Plus
alt="๋”ํ•˜๊ธฐ"
onMouseDown={onIncrease}
Expand Down Expand Up @@ -294,7 +294,7 @@ const totalContainer = (props) => css`
: "white"};
`;

const watchContainer = css`
const watchContainer = (props) => css`
display: flex;
justify-content: center;
line-height: 50px;
Expand All @@ -319,11 +319,15 @@ const watchContainer = css`
}
.plus:hover {
fill: #bcfcff;
fill: rgba(${props.speed.current / 1.4}, 255, 255);
}
.minus:hover {
fill: #ffc4c4;
fill: rgba(
255,
${props.speed.current / 1.4 + 20},
${props.speed.current / 1.4 + 20}
);
}
`;

Expand Down

0 comments on commit 4c07401

Please sign in to comment.