feat(inquiries): Replace custom EditIcon with PencilSquareIcon component
- Remove custom EditIcon SVG component definition from inquiries table - Import PencilSquareIcon from assets/icons instead of custom implementation - Update change status button to use PencilSquareIcon component - Improve code maintainability by using centralized icon library - Format ListHeader component props for better readability
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"use client";
|
||||
import { TrashIcon } from "@/assets/icons";
|
||||
import { PencilSquareIcon, TrashIcon } from "@/assets/icons";
|
||||
import EmptyListWrapper from "@/components/HOC/EmptyListWrapper";
|
||||
import ConfirmationModal from "@/components/ui/ConfirmationModal";
|
||||
import ListHeader from "@/components/ui/ListHeader";
|
||||
@@ -22,18 +22,6 @@ import ChangeStatusForm from "./ChangeStatusForm";
|
||||
import InquiriesListFilters from "./InquiriesListFilters";
|
||||
import useInquiriesListPresenter from "./useInquiriesListPresenter";
|
||||
|
||||
const EditIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg
|
||||
width="18"
|
||||
height="18"
|
||||
viewBox="0 0 18 18"
|
||||
fill="currentColor"
|
||||
{...props}
|
||||
>
|
||||
<path d="M13.7 2.3c.4-.4 1-.4 1.4 0l.6.6c.4.4.4 1 0 1.4l-1 1-2-2 1-1zm-2 2l-8 8v2h2l8-8-2-2z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const InquiriesTable = () => {
|
||||
const {
|
||||
columns,
|
||||
@@ -61,7 +49,10 @@ const InquiriesTable = () => {
|
||||
} = useInquiriesListPresenter();
|
||||
return (
|
||||
<div className="flex flex-col rounded-[10px] bg-white px-7.5 pb-4 pt-7.5 shadow-1 dark:bg-gray-dark dark:shadow-card">
|
||||
<ListHeader onFilter={() => setIsFilterModalOpen(true)} hasCreate={false}/>
|
||||
<ListHeader
|
||||
onFilter={() => setIsFilterModalOpen(true)}
|
||||
hasCreate={false}
|
||||
/>
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow className="border-none uppercase [&>th]:text-start">
|
||||
@@ -117,7 +108,7 @@ const InquiriesTable = () => {
|
||||
{..._TooltipDefaultParams({ id: "change-status" })}
|
||||
/>
|
||||
<span className="sr-only">Change Status</span>
|
||||
<EditIcon />
|
||||
<PencilSquareIcon />
|
||||
</button>
|
||||
<button
|
||||
data-tooltip-id="delete"
|
||||
|
||||
Reference in New Issue
Block a user