added WeekSelector

This commit is contained in:
AlexE030
2023-05-04 12:33:20 +02:00
parent cc39ce4e90
commit 1614bdc04d
4 changed files with 39 additions and 19 deletions
+20
View File
@@ -0,0 +1,20 @@
import Button from "@/components/Button";
import DateElement from "@/components/DateElement";
import { arrowLeft } from "./Icons"
import { arrowRight } from "./Icons"
import { useState } from 'react'
export default function WeekSelector(){
const [weeks, setWeeks] = useState(0)
return (
<>
<div className="weekSelector">
<Button icon={arrowLeft} onClick={() => setWeeks(weeks-1)} />
<DateElement week={weeks}/>
<Button icon={arrowRight} onClick={() => setWeeks(weeks+1)}/>
</div>
</>
)
}