File tree 3 files changed +68
-3
lines changed
3 files changed +68
-3
lines changed Original file line number Diff line number Diff line change 1
- export const Filter = ( ) => {
2
- return < div > Filter</ div > ;
3
- } ;
1
+ import { ChevronDownIcon } from 'lucide-react' ;
2
+ import { FC } from 'react' ;
3
+
4
+ import { Button } from '@/components/Button/Button' ;
5
+ import { cn } from '@/utils' ;
6
+
7
+ import { FilterProps } from './Filter.types' ;
8
+ import {
9
+ filterButtonIconVariants ,
10
+ filterButtonVariants ,
11
+ filterVariants ,
12
+ } from './Filter.variants' ;
13
+
14
+ export const Filter : FC < FilterProps > = ( { className } ) => (
15
+ < div className = { cn ( filterVariants ( { className } ) ) } >
16
+ < div className = "relative" >
17
+ < button className = { cn ( filterButtonVariants ( ) ) } >
18
+ Status < ChevronDownIcon className = { cn ( filterButtonIconVariants ( ) ) } />
19
+ </ button >
20
+ </ div >
21
+
22
+ < div className = "relative" >
23
+ < button className = { cn ( filterButtonVariants ( ) ) } >
24
+ Created < ChevronDownIcon className = { cn ( filterButtonIconVariants ( ) ) } />
25
+ </ button >
26
+ </ div >
27
+
28
+ < div className = "relative" >
29
+ < button className = { cn ( filterButtonVariants ( ) ) } >
30
+ Type < ChevronDownIcon className = { cn ( filterButtonIconVariants ( ) ) } />
31
+ </ button >
32
+ </ div >
33
+
34
+ < Button
35
+ type = "button"
36
+ variant = "text"
37
+ theme = "civo"
38
+ appearance = "compact"
39
+ version = "alternate"
40
+ >
41
+ Reset
42
+ </ Button >
43
+ </ div >
44
+ ) ;
Original file line number Diff line number Diff line change
1
+ import { VariantProps } from 'class-variance-authority' ;
2
+ import { filterVariants } from './Filter.variants' ;
3
+
4
+ export interface FilterProps extends VariantProps < typeof filterVariants > {
5
+ className ?: string ;
6
+ }
Original file line number Diff line number Diff line change
1
+ import { cva } from 'class-variance-authority' ;
2
+
3
+ export const filterVariants = cva ( [ 'flex' , 'gap-8' , 'items-center' ] ) ;
4
+
5
+ export const filterButtonVariants = cva ( [
6
+ 'flex' ,
7
+ 'items-center' ,
8
+ 'gap-1' ,
9
+ 'text-slate-500' ,
10
+ 'cursor-pointer' ,
11
+ 'text-sm' ,
12
+ ] ) ;
13
+
14
+ export const filterButtonIconVariants = cva ( [
15
+ 'text-slate-400' ,
16
+ 'h-[20px]' ,
17
+ 'w-[20px]' ,
18
+ ] ) ;
You can’t perform that action at this time.
0 commit comments