From 1ce813191e21be92e59839e441c3c6460016b4e5 Mon Sep 17 00:00:00 2001 From: Saurabh Puri Date: Tue, 17 Dec 2024 11:44:36 +0530 Subject: [PATCH] add job listing page --- app/src/app/job-listing/page.tsx | 10 +++ app/src/components/JobListing.tsx | 67 +++++++++++++++++ app/src/components/ui/table.tsx | 120 ++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+) create mode 100644 app/src/app/job-listing/page.tsx create mode 100644 app/src/components/JobListing.tsx create mode 100644 app/src/components/ui/table.tsx diff --git a/app/src/app/job-listing/page.tsx b/app/src/app/job-listing/page.tsx new file mode 100644 index 0000000..54a28ff --- /dev/null +++ b/app/src/app/job-listing/page.tsx @@ -0,0 +1,10 @@ +import JobListingTable from "@/components/JobListing"; + +export default function JobListing() { + return ( +
+ {" "} + +
+ ); +} diff --git a/app/src/components/JobListing.tsx b/app/src/components/JobListing.tsx new file mode 100644 index 0000000..aa8ef13 --- /dev/null +++ b/app/src/components/JobListing.tsx @@ -0,0 +1,67 @@ +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow +} from "@/components/ui/table"; +import { EyeIcon, Trash, Search, ListFilter } from "lucide-react"; + +const JobListingTable = () => { + return ( +
+
+

Job Listing

+ +
+ +
+
+ + + + +
+ + +
+ + + + + ID + Date + Job Title + Action + + + + + #1234 + 12 Dec 2024 + Data Analyst + + + + + + +
+
+ ); +}; + +export default JobListingTable; diff --git a/app/src/components/ui/table.tsx b/app/src/components/ui/table.tsx new file mode 100644 index 0000000..10ed42d --- /dev/null +++ b/app/src/components/ui/table.tsx @@ -0,0 +1,120 @@ +import * as React from "react"; + +import { cn } from "@/lib/utils"; + +const Table = React.forwardRef< + HTMLTableElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+ + +)); +Table.displayName = "Table"; + +const TableHeader = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableHeader.displayName = "TableHeader"; + +const TableBody = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableBody.displayName = "TableBody"; + +const TableFooter = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + tr]:last:border-b-0", + className + )} + {...props} + /> +)); +TableFooter.displayName = "TableFooter"; + +const TableRow = React.forwardRef< + HTMLTableRowElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableRow.displayName = "TableRow"; + +const TableHead = React.forwardRef< + HTMLTableCellElement, + React.ThHTMLAttributes +>(({ className, ...props }, ref) => ( +
[role=checkbox]]:translate-y-[2px]", + className + )} + {...props} + /> +)); +TableHead.displayName = "TableHead"; + +const TableCell = React.forwardRef< + HTMLTableCellElement, + React.TdHTMLAttributes +>(({ className, ...props }, ref) => ( + [role=checkbox]]:translate-y-[2px]", + className + )} + {...props} + /> +)); +TableCell.displayName = "TableCell"; + +const TableCaption = React.forwardRef< + HTMLTableCaptionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +TableCaption.displayName = "TableCaption"; + +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption +};