Add ViewMode Year
This commit is contained in:
1 parent
babd3e0fea
commit
8a56c6a9f9
5 files changed
+69
-5
No files matched your search
+3
-1
@@ -10,7 +10,9 @@ const App = () => {
|
||||
const [tasks, setTasks] = React.useState<Task[]>(initTasks());
|
||||
const [isChecked, setIsChecked] = React.useState(true);
|
||||
let columnWidth = 65;
|
||||
if (view === ViewMode.Month) {
|
||||
if (view === ViewMode.Year) {
|
||||
columnWidth = 350;
|
||||
} else if (view === ViewMode.Month) {
|
||||
columnWidth = 300;
|
||||
} else if (view === ViewMode.Week) {
|
||||
columnWidth = 250;
|
||||
|
||||
@@ -46,7 +46,12 @@ export const ViewSwitcher: React.SFC<ViewSwitcherProps> = ({
|
||||
>
|
||||
Month
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="Button"
|
||||
onClick={() => onViewModeChange(ViewMode.Year)}
|
||||
>
|
||||
Year
|
||||
</button>
|
||||
<div className="Switch">
|
||||
<label className="Switch_Toggle">
|
||||
<input
|
||||
|
||||
Reference in new issue
Block a user