@@ -19,7 +19,7 @@ import TutorialTags from "@/components/TutorialTags"
19
19
import { Button , ButtonLink } from "@/components/ui/buttons/Button"
20
20
import Modal from "@/components/ui/dialog-modal"
21
21
import { Flex , FlexProps } from "@/components/ui/flex"
22
- import { Tag } from "@/components/ui/tag"
22
+ import { Tag , TagButton } from "@/components/ui/tag"
23
23
24
24
import { cn } from "@/lib/utils/cn"
25
25
import { existsNamespace } from "@/lib/utils/existsNamespace"
@@ -49,16 +49,15 @@ const FilterTag = forwardRef<{ isActive: boolean; name: string }, "button">(
49
49
( props , ref ) => {
50
50
const { isActive, name, ...rest } = props
51
51
return (
52
- < Tag
52
+ < TagButton
53
+ ref = { ref }
53
54
variant = { isActive ? "solid" : "outline" }
54
55
status = { isActive ? "tag" : "normal" }
55
- className = "hover:border-primary-hover "
56
- asChild
56
+ className = "justify-center "
57
+ { ... rest }
57
58
>
58
- < Button ref = { ref } { ...rest } >
59
- { name }
60
- </ Button >
61
- </ Tag >
59
+ { name }
60
+ </ TagButton >
62
61
)
63
62
}
64
63
)
@@ -278,17 +277,19 @@ const TutorialPage = ({
278
277
< div className = "my-8 w-full shadow-table-box md:w-2/3" >
279
278
< Flex className = "m-8 flex-col justify-center border-b border-border px-0 pb-4 pt-4 md:pb-8" >
280
279
< Flex className = "mb-4 max-w-full flex-wrap items-center gap-2" >
281
- { Object . entries ( allTags ) . map ( ( [ tagName , tagCount ] , idx ) => {
282
- const name = `${ tagName } (${ tagCount } )`
283
- const isActive = selectedTags . includes ( tagName )
284
- return (
285
- < FilterTag
286
- key = { idx }
287
- onClick = { ( ) => handleTagSelect ( tagName ) }
288
- { ...{ name, isActive } }
289
- />
290
- )
291
- } ) }
280
+ < div className = "flex w-full flex-wrap gap-2 lg:grid lg:grid-cols-3 lg:gap-4 xl:grid-cols-4 2xl:grid-cols-5" >
281
+ { Object . entries ( allTags ) . map ( ( [ tagName , tagCount ] , idx ) => {
282
+ const name = `${ tagName } (${ tagCount } )`
283
+ const isActive = selectedTags . includes ( tagName )
284
+ return (
285
+ < FilterTag
286
+ key = { idx }
287
+ onClick = { ( ) => handleTagSelect ( tagName ) }
288
+ { ...{ name, isActive } }
289
+ />
290
+ )
291
+ } ) }
292
+ </ div >
292
293
{ selectedTags . length > 0 && (
293
294
< Button
294
295
className = "cursor-pointer p-0 text-primary underline"
0 commit comments