@@ -27,9 +27,13 @@ export function getSelectedValues<T extends string>(options: FilterOption<T>[])
2727export interface FilterProps < T extends FilterOptions = FilterOptions > {
2828 options : T
2929 onChange : ( options : T ) => void
30+ classNames ?: {
31+ trigger ?: string
32+ content ?: string
33+ }
3034}
3135
32- export function Filter < T extends FilterOptions > ( { options, onChange } : FilterProps < T > ) {
36+ export function Filter < T extends FilterOptions > ( { options, onChange, classNames } : FilterProps < T > ) {
3337 const [ openModal , setOpenModal ] = React . useState ( false )
3438 const [ internalOptions , setInternalOptions ] = React . useState < T > ( options )
3539 const [ selectedColumn , setSelectedColumn ] = React . useState < string | null > (
@@ -82,14 +86,19 @@ export function Filter<T extends FilterOptions>({ options, onChange }: FilterPro
8286 return (
8387 < Popover open = { openModal } onOpenChange = { setOpenModal } >
8488 < PopoverTrigger asChild >
85- < Button variant = "outline" className = " w-fit" >
89+ < Button variant = "outline" className = { cn ( ' w-fit' , classNames ?. trigger ) } >
8690 < Typography className = "text-icon-tertiary" > Filter</ Typography >
8791 < CountBadge count = { totalSelected } />
8892 < SlidersHorizontalIcon className = "text-icon-tertiary" />
8993 </ Button >
9094 </ PopoverTrigger >
9195 < PopoverContent asChild >
92- < div className = "w-fit py-6 bg-surface-primary border border-border-primary rounded-xl flex flex-col gap-4 min-w-[600px] h-[436px]" >
96+ < div
97+ className = { cn (
98+ 'w-fit py-6 bg-surface-primary border border-border-primary rounded-xl flex flex-col gap-4 min-w-[600px] h-[436px]' ,
99+ classNames ?. content
100+ ) }
101+ >
93102 < Typography type = "h4" weight = "bold" className = "px-6 text-lg w-full" >
94103 Apply Filters
95104 </ Typography >
0 commit comments