mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Added missing PartCard
This commit is contained in:
parent
60f946f6cb
commit
126b564676
1 changed files with 36 additions and 0 deletions
36
src/app/components/property/PartCard.tsx
Normal file
36
src/app/components/property/PartCard.tsx
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { PencilSquareIcon } from "@heroicons/react/24/outline";
|
||||
import { useState } from "react";
|
||||
import PartModal from "./PartModal";
|
||||
|
||||
export default function PartCard({
|
||||
title,
|
||||
description,
|
||||
}: {
|
||||
title: string;
|
||||
description: string;
|
||||
}) {
|
||||
const [isDetailModalOpen, setIsDetailModalOpen] = useState(false);
|
||||
|
||||
return (
|
||||
<section>
|
||||
<div className="mt-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-xl font-bold">{title}</h2>
|
||||
<button
|
||||
className="flex items-center text-brandmidblue hover:text-brandblue transition-colors duration-200 cursor-pointer"
|
||||
onClick={() => setIsDetailModalOpen(true)}
|
||||
>
|
||||
<PencilSquareIcon className="h-6 w-6 ml-2" />
|
||||
Edit
|
||||
</button>
|
||||
</div>
|
||||
<p className="text-gray-600">{description}</p>
|
||||
</div>
|
||||
<PartModal
|
||||
isOpen={isDetailModalOpen}
|
||||
setIsOpen={setIsDetailModalOpen}
|
||||
title={title}
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue