19 lines
839 B
TypeScript
19 lines
839 B
TypeScript
import { PlusCircleIcon } from "@heroicons/react/24/outline";
|
|
import { YearMonth } from "../lib/db-types";
|
|
import { formatYearMonth } from "../lib/format";
|
|
import Link from "next/link";
|
|
|
|
|
|
export interface AddLocationButtonProps {
|
|
/** year and month at which the new billing location should be addes */
|
|
yearMonth: YearMonth
|
|
}
|
|
|
|
export const AddLocationButton:React.FC<AddLocationButtonProps> = ({yearMonth}) =>
|
|
<div className="card card-compact card-bordered bg-base-100 shadow-s my-1">
|
|
<Link href={`/location/${ formatYearMonth(yearMonth) }/add`} className="card-body tooltip self-center" data-tip="Add a new billing location">
|
|
<span className='grid self-center' data-tip="Add a new billing location">
|
|
<PlusCircleIcon className="h-[1em] w-[1em] cursor-pointer text-4xl" />
|
|
</span>
|
|
</Link>
|
|
</div>; |