@@ -22,35 +22,28 @@ const categoryLinks = getCategoryLinks(posts, filterPathname);
22
22
---
23
23
24
24
<section {... props } class ={ cn (className )} >
25
- <div class =" flex items-start flex-col md:flex-row gap-2 mb-4" >
26
- <h4 class =" b-h4 shrink-0 w-24 md:w-28 my-0" >Categories:</h4 >
27
- <FilterList class =" gap-4" itemLinks ={ categoryLinks } >
28
- {
29
- ({ href , text , textWithCount , isActive }: FilterLink ) => {
30
- const { icon } = getCategoryProps (text );
31
- const buttonProps = isActive ? ({ colors: ' primary' , variant: ' solid' } as const ) : {};
32
-
33
- return (
34
- <Button href = { href } size = " md" { ... buttonProps } >
35
- <Icon name = { icon } slot = " before-icon" />
36
- { textWithCount }
37
- </Button >
38
- );
39
- }
40
- }
41
- </FilterList >
42
- </div >
43
-
44
- <div class =" flex items-start flex-col md:flex-row gap-2" >
45
- <h4 class =" b-h4 shrink-0 w-24 md:w-28 my-0" >Tags:</h4 >
46
- <FilterList itemLinks ={ tagLinks } >
47
- {
48
- ({ href , textWithCount , isActive }: FilterLink ) => (
49
- <Tag href = { href } size = " md" colors = { isActive ? ' primary' : ' default' } >
25
+ <FilterList class =" gap-4 mb-4" itemLinks ={ categoryLinks } >
26
+ {
27
+ ({ href , text , textWithCount , isActive }: FilterLink ) => {
28
+ const { icon } = getCategoryProps (text );
29
+ const buttonProps = isActive ? ({ colors: ' primary' , variant: ' solid' } as const ) : {};
30
+
31
+ return (
32
+ <Button href = { href } size = " md" { ... buttonProps } >
33
+ <Icon name = { icon } slot = " before-icon" />
50
34
{ textWithCount }
51
- </Tag >
52
- )
35
+ </Button >
36
+ );
53
37
}
54
- </FilterList >
55
- </div >
38
+ }
39
+ </FilterList >
40
+ <FilterList itemLinks ={ tagLinks } >
41
+ {
42
+ ({ href , textWithCount , isActive }: FilterLink ) => (
43
+ <Tag href = { href } size = " md" colors = { isActive ? ' primary' : ' default' } >
44
+ { textWithCount }
45
+ </Tag >
46
+ )
47
+ }
48
+ </FilterList >
56
49
</section >
0 commit comments