diff --git a/components/cases/case-information-item.tsx b/components/cases/case-information-item.tsx new file mode 100644 index 0000000..ae25007 --- /dev/null +++ b/components/cases/case-information-item.tsx @@ -0,0 +1,20 @@ +import clsx from "clsx"; +import { ComponentPropsWithoutRef, forwardRef } from "react"; + +export interface SectionCardProps extends Omit, "children"> { + label: string; + value: string; +} + +export const CaseInformationItem = forwardRef( + ({ className, label, value, ...rest }, ref) => { + return ( +
+ {label} +

{value}

+
+ ); + } +); + +CaseInformationItem.displayName = "CaseInformationItem"; diff --git a/components/close-contact/add-close-contact-button.tsx b/components/close-contact/add-close-contact-button.tsx new file mode 100644 index 0000000..fb4fda1 --- /dev/null +++ b/components/close-contact/add-close-contact-button.tsx @@ -0,0 +1,15 @@ +import { PlusIcon } from "@heroicons/react/outline"; +import { forwardRef } from "react"; +import { PrimaryButton, ButtonProps } from "../ui/button"; + +export const AddCloseContactButton = forwardRef( + ({ ...rest }, ref) => { + return ( + + Tambah Kontak Erat Baru + + ); + } +); + +AddCloseContactButton.displayName = "AddCloseContactButton"; diff --git a/components/close-contact/close-contact-card.tsx b/components/close-contact/close-contact-card.tsx new file mode 100644 index 0000000..3a0b4c4 --- /dev/null +++ b/components/close-contact/close-contact-card.tsx @@ -0,0 +1,37 @@ +import { PlusIcon } from "@heroicons/react/outline"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { OutlineAnchorButton, PrimaryButton } from "../ui/button"; + +export function CloseContactCard() { + const router = useRouter(); + + return ( +
+
+
+

Chairul Amar

+

PKM. KEL. PETOJO UTARA

+
+
+

+ No. HP: +62876085357 +

+

+ Karantina Hari Ke: 0 +

+
+
+
+ Pemantauan + + Lihat Detil + +
+
+ ); +} diff --git a/components/layout/dashboard/dashboard-page-header.tsx b/components/layout/dashboard/dashboard-page-header.tsx index 0acdf57..0611359 100644 --- a/components/layout/dashboard/dashboard-page-header.tsx +++ b/components/layout/dashboard/dashboard-page-header.tsx @@ -4,13 +4,18 @@ import { Container } from "~/components/ui/container"; export interface DashboardPageHeaderProps extends ComponentPropsWithoutRef<"div"> { pageTitle?: string; + variant?: "default" | "alternate"; } export const DashboardPageHeader = forwardRef( - ({ className, pageTitle, children, ...rest }, ref) => { + ({ className, pageTitle, children, variant = "default", ...rest }, ref) => { return (
diff --git a/components/ui/button/utils/helpers.ts b/components/ui/button/utils/helpers.ts index 1618da6..58f247b 100644 --- a/components/ui/button/utils/helpers.ts +++ b/components/ui/button/utils/helpers.ts @@ -7,7 +7,7 @@ export const disabledStyles = "disabled:cursor-not-allowed disabled:opacity-75"; export function buttonBlockStyles(block?: boolean, iconPosition: ButtonIconPositions = "left") { return [ - block ? "flex" : "inline-flex", + block ? "flex w-full" : "inline-flex", iconPosition === "right" ? "flex-row-reverse" : "flex-row", ]; } diff --git a/components/ui/card/index.ts b/components/ui/card/index.ts new file mode 100644 index 0000000..eb7adf7 --- /dev/null +++ b/components/ui/card/index.ts @@ -0,0 +1,2 @@ +export * from "./section-card-header"; +export * from "./section-card"; diff --git a/components/ui/card/section-card-header.tsx b/components/ui/card/section-card-header.tsx new file mode 100644 index 0000000..8d096a1 --- /dev/null +++ b/components/ui/card/section-card-header.tsx @@ -0,0 +1,23 @@ +import clsx from "clsx"; +import { ComponentPropsWithoutRef, forwardRef } from "react"; + +export interface SectionCardHeaderProps extends Omit, "children"> { + title: string; +} + +export const SectionCardHeader = forwardRef( + ({ className, title, ...rest }, ref) => { + return ( +
+ + ); + } +); + +SectionCardHeader.displayName = "SectionCardHeader"; diff --git a/components/ui/card/section-card.tsx b/components/ui/card/section-card.tsx new file mode 100644 index 0000000..3590702 --- /dev/null +++ b/components/ui/card/section-card.tsx @@ -0,0 +1,23 @@ +import clsx from "clsx"; +import { ComponentPropsWithoutRef, forwardRef } from "react"; + +export type SectionCardProps = ComponentPropsWithoutRef<"div">; + +export const SectionCard = forwardRef( + ({ className, children, ...rest }, ref) => { + return ( +
+ {children} +
+ ); + } +); + +SectionCard.displayName = "SectionCard"; diff --git a/pages/dashboard/tracing/[caseId]/index.tsx b/pages/dashboard/tracing/[caseId]/index.tsx index bb2c45e..d6de66a 100644 --- a/pages/dashboard/tracing/[caseId]/index.tsx +++ b/pages/dashboard/tracing/[caseId]/index.tsx @@ -1,41 +1,87 @@ import { ArrowCircleLeftIcon } from "@heroicons/react/outline"; import Link from "next/link"; -import { useRouter } from "next/router"; +import { CaseInformationItem } from "~/components/cases/case-information-item"; +import { AddCloseContactButton } from "~/components/close-contact/add-close-contact-button"; +import { CloseContactCard } from "~/components/close-contact/close-contact-card"; import { DashboardPage, DashboardPageHeader, DashboardPageContent, } from "~/components/layout/dashboard"; +import { SectionCard, SectionCardHeader } from "~/components/ui/card"; export default function TracingCaseDetail() { - const router = useRouter(); - - console.log(router.query.caseId); + const handleAddCloseContact = () => { + console.log("clicked"); + }; return ( - -
-
-
- - - - - + +
+
+ + + + + +
+
+

Detail Kasus Konfirmasi

+
+
+
+ +
+ +
+ +
+ + + + + + +
+
+
+
+
+
+

+ Daftar Kontak Erat Pasien +

+
+
+ +
-

Detail Kasus Konfirmasi

+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
-
Header Sub (Informasi Utama, etc.)
- - Content (Daftar Kontak Erat, etc.) +
+
+ +
); } diff --git a/tailwind.config.js b/tailwind.config.js index ee309cb..ecb2b6e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -19,6 +19,9 @@ module.exports = { 900: "#0a2924", }, }, + boxShadow: { + floating: "0px -4px 16px rgba(0, 0, 0, 0.1)", + }, }, }, variants: {