main
|
Last change
on this file since 700e2f9 was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago |
|
Init
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Rev | Line | |
|---|
| [700e2f9] | 1 | import type { Component } from "solid-js";
|
|---|
| 2 |
|
|---|
| 3 | interface CalendarHeaderProps {
|
|---|
| 4 | monthName: string;
|
|---|
| 5 | onPreviousMonth: () => void;
|
|---|
| 6 | onNextMonth: () => void;
|
|---|
| 7 | }
|
|---|
| 8 |
|
|---|
| 9 | const CalendarHeader: Component<CalendarHeaderProps> = (props) => (
|
|---|
| 10 | <div class="flex justify-between items-center mb-6">
|
|---|
| 11 | <button
|
|---|
| 12 | onClick={props.onPreviousMonth}
|
|---|
| 13 | class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2 cursor-pointer"
|
|---|
| 14 | >
|
|---|
| 15 | <svg
|
|---|
| 16 | class="w-5 h-5"
|
|---|
| 17 | fill="none"
|
|---|
| 18 | stroke="currentColor"
|
|---|
| 19 | viewBox="0 0 24 24"
|
|---|
| 20 | >
|
|---|
| 21 | <path
|
|---|
| 22 | stroke-linecap="round"
|
|---|
| 23 | stroke-linejoin="round"
|
|---|
| 24 | stroke-width="2"
|
|---|
| 25 | d="M15 19l-7-7 7-7"
|
|---|
| 26 | />
|
|---|
| 27 | </svg>
|
|---|
| 28 | Previous
|
|---|
| 29 | </button>
|
|---|
| 30 |
|
|---|
| 31 | <h2 class="text-2xl font-bold text-gray-900">{props.monthName}</h2>
|
|---|
| 32 |
|
|---|
| 33 | <button
|
|---|
| 34 | onClick={props.onNextMonth}
|
|---|
| 35 | class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2 cursor-pointer"
|
|---|
| 36 | >
|
|---|
| 37 | Next
|
|---|
| 38 | <svg
|
|---|
| 39 | class="w-5 h-5"
|
|---|
| 40 | fill="none"
|
|---|
| 41 | stroke="currentColor"
|
|---|
| 42 | viewBox="0 0 24 24"
|
|---|
| 43 | >
|
|---|
| 44 | <path
|
|---|
| 45 | stroke-linecap="round"
|
|---|
| 46 | stroke-linejoin="round"
|
|---|
| 47 | stroke-width="2"
|
|---|
| 48 | d="M9 5l7 7-7 7"
|
|---|
| 49 | />
|
|---|
| 50 | </svg>
|
|---|
| 51 | </button>
|
|---|
| 52 | </div>
|
|---|
| 53 | );
|
|---|
| 54 |
|
|---|
| 55 | export default CalendarHeader;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.