-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: product details implementation (#48)
- Loading branch information
Showing
29 changed files
with
981 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
apps/web/public/images/product-details/producer-info/External-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
apps/web/public/images/product-details/producer-info/Information-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
apps/web/public/images/product-details/producer-info/Location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
apps/web/public/images/product-details/producer-info/Send.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
apps/web/public/images/product-details/producer-info/Star-highlighted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
apps/web/public/images/product-details/producer-info/Star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
apps/web/public/images/product-details/producer-info/farm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
apps/web/public/images/product-details/producer-info/shopping-basket.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import Button from "@repo/ui/button"; | ||
import BottomModal from "~/app/_components/ui/BottomModal"; | ||
|
||
interface FarmModalProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
farmData: { | ||
name: string; | ||
since: string; | ||
bio: string; | ||
experiences: string; | ||
goodPractices: string; | ||
}; | ||
isEditable?: boolean; | ||
onEdit: () => void; | ||
} | ||
|
||
function FarmModal({ | ||
isOpen, | ||
onClose, | ||
farmData, | ||
isEditable, | ||
onEdit, | ||
}: FarmModalProps) { | ||
return ( | ||
<BottomModal isOpen={isOpen} onClose={onClose}> | ||
<div className="flex flex-col items-center w-full"> | ||
<div className="w-full max-w-[24.375rem]"> | ||
<div className="flex flex-col gap-6"> | ||
<div> | ||
<h3 className="text-2xl font-bold text-content-title"> | ||
{farmData.name} | ||
</h3> | ||
<p className="text-sm text-content-body-default"> | ||
producing coffee since {farmData.since} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<h4 className="text-base font-semibold mb-2">Bio</h4> | ||
<p className="text-base text-content-title">{farmData.bio}</p> | ||
</div> | ||
|
||
<div> | ||
<h4 className="text-base font-semibold mb-2">Experiences</h4> | ||
<p className="text-base text-content-title"> | ||
{farmData.experiences} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<h4 className="text-base font-semibold mb-2">Good practices</h4> | ||
<p className="text-base text-content-title"> | ||
{farmData.goodPractices} | ||
</p> | ||
</div> | ||
|
||
{isEditable && ( | ||
<Button onClick={onEdit} className="w-full"> | ||
Edit | ||
</Button> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
</BottomModal> | ||
); | ||
} | ||
|
||
export { FarmModal }; |
Oops, something went wrong.