Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
amitjimiwal committed Aug 9, 2023
1 parent 39b8e1e commit ad0c54c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import Header from "./components/Header";
import Main from "./components/Main/Main";
import Settings from "./components/Settings";
import { RootState } from "./redux/store";
import { POMODORO, SHORT_BREAK } from "./constant";
function App() {
const { settingsopen ,modes,mode} = useSelector((state: RootState) => state.timer);
const { settingsopen ,mode} = useSelector((state: RootState) => state.timer);
const background= mode == POMODORO ? 'bg-pomodoro' : mode== SHORT_BREAK ? 'bg-shortbreak' : 'bg-longbreak'
return (
<div className={`${settingsopen ? 'bg-opacity-75': ''} w-full h-screen flex justify-center bg-[${modes[mode].color}] transition-colors`}>
<div className={`${settingsopen ? 'bg-opacity-75': ''} w-full h-screen flex justify-center ${background} transition-colors`}>
<div className={`${settingsopen ? 'bg-opacity-25': ''} h-screen p-4 w-full sm:max-w-2xl`}>
<Header />
<Main />
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useCountdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ console.log(timeLeft);
reset,
ticking,
timeLeft,
progress: (progress / time) * 100,
progress: (progress / time) * 100000,
};
}
5 changes: 4 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export default {
bgbutton:'#ffffff33',
loaderbg:'#0000001a',
modebackground:'#00000026',
settingscolor:'#EFEFEF'
settingscolor:'#EFEFEF',
pomodoro:'#FCA5A5',
shortbreak:'#397097',
longbreak:'#518A58'
}
},
},
Expand Down

0 comments on commit ad0c54c

Please sign in to comment.