feat(admins): add filter functionality to admins list
This commit introduces filtering capabilities to the administrators table, allowing users to refine the list based on specific criteria. A new `ListHeader` component has been implemented, which now contains the "Create Admin" button and a new "Filter" button. Clicking the filter button opens a modal containing the `AdminListFilters` form. The state for managing the filter modal's visibility is handled within the `useAdminsPresenter` hook. A new `FilterIcon` has also been added to support this feature.
This commit is contained in:
@@ -12,6 +12,7 @@ interface ModalProps {
|
||||
confirmText?: string;
|
||||
cancelText?: string;
|
||||
showButtons?: boolean;
|
||||
classNames?: string;
|
||||
}
|
||||
|
||||
const Modal: React.FC<ModalProps> = ({
|
||||
@@ -22,6 +23,7 @@ const Modal: React.FC<ModalProps> = ({
|
||||
confirmText = "confirm",
|
||||
cancelText = "close",
|
||||
showButtons = true,
|
||||
classNames,
|
||||
}) => {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
const isMutating = useIsMutating();
|
||||
@@ -49,7 +51,7 @@ const Modal: React.FC<ModalProps> = ({
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className="max-h-[90vh] min-w-75 max-w-[90vw] overflow-auto rounded-lg bg-white p-5 shadow-4 dark:bg-dark-2"
|
||||
className={`max-h-[90vh] max-w-[90vw] overflow-auto rounded-lg bg-white p-5 shadow-4 dark:bg-dark-2 ${classNames}`}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user