mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-15 18:06:48 +02:00
First public commit
This commit is contained in:
commit
e05cd62e53
228 changed files with 17717 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
import * as React from "react";
|
||||
|
||||
import ChevronLeft from "../../icons/chevron-left.svg";
|
||||
import ChevronRight from "../../icons/chevron-right.svg";
|
||||
|
||||
export interface DateNavigationToolbarProps {
|
||||
year: number;
|
||||
label: string;
|
||||
onPrevious: () => void;
|
||||
onNext: () => void;
|
||||
onToday: () => void;
|
||||
}
|
||||
|
||||
const DateNavigationToolbar: React.VoidFunctionComponent<DateNavigationToolbarProps> =
|
||||
({ year, label, onPrevious, onToday, onNext }) => {
|
||||
return (
|
||||
<div className="flex border-b items-center w-full px-4 h-14 shrink-0">
|
||||
<div className="grow">
|
||||
<span className="text-sm font-bold text-gray-400 mr-2">{year}</span>
|
||||
<span className="text-lg font-bold text-gray-700">{label}</span>
|
||||
</div>
|
||||
<div className="flex space-x-2 items-center">
|
||||
<div className="segment-button">
|
||||
<button type="button" onClick={onPrevious}>
|
||||
<ChevronLeft className="h-5" />
|
||||
</button>
|
||||
<button type="button" onClick={onToday}>
|
||||
Today
|
||||
</button>
|
||||
<button type="button" onClick={onNext}>
|
||||
<ChevronRight className="h-5" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default DateNavigationToolbar;
|
Loading…
Add table
Add a link
Reference in a new issue