pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
31 lines (30 loc) • 1.03 kB
TypeScript
import type { ChangeEvent } from 'react';
import React from 'react';
interface FilterComponentProps {
filters: Array<{
name: string;
placeholder?: string;
type: 'select' | 'multi-select' | 'date';
options?: Array<{
label: string;
value: string;
}>;
dateValue?: Date | null;
onDateChange?: (date: Date) => void;
}>;
searctInputPlaceHolder?: string;
showApplyFilterButton?: boolean;
showClearFilters: boolean;
showApplyFilters?: boolean;
selectedFilters: Record<string, string | string[] | Date | null>;
showSearch?: boolean;
searchQuery?: string;
isNarrow: boolean;
children?: React.ReactNode;
handleFilterChange: (name: string, value: string | string[] | Date | null) => void;
handleApplyFilters: () => void;
resetFilters: () => void;
onSearch?: (e: ChangeEvent<HTMLInputElement>) => void;
}
declare const FilterComponent: React.FC<FilterComponentProps>;
export default FilterComponent;