1- import { TextInput , ActionMenu , ActionList , Button , Box } from '@primer/react'
1+ import { TextInput , ActionMenu , ActionList , Button } from '@primer/react'
22import { SearchIcon } from '@primer/octicons-react'
33import { useRef , useEffect , useState } from 'react'
44import { ArticleCardItems } from '@/landings/types'
55import { useTranslation } from '@/languages/components/useTranslation'
66
7+ import styles from './CookBookFilter.module.scss'
8+
79type Props = {
810 tokens : ArticleCardItems
911 onSearch : ( query : string ) => void
@@ -61,8 +63,7 @@ export const CookBookFilter = ({
6163 < form onSubmit = { ( e ) => e . preventDefault ( ) } >
6264 < TextInput
6365 leadingVisual = { SearchIcon }
64- className = "m-1"
65- sx = { { minWidth : [ 'stretch' , 'stretch' , 'stretch' , 'stretch' ] } }
66+ className = { `m-1 ${ styles . textInput } ` }
6667 placeholder = { t ( 'search_articles' ) }
6768 ref = { inputRef }
6869 autoComplete = "false"
@@ -76,14 +77,7 @@ export const CookBookFilter = ({
7677 < div className = "d-flex flex-wrap flex-md-nowrap " >
7778 < ActionMenu >
7879 < ActionMenu . Button className = "col-md-1 col-sm-2 m-1" >
79- < Box
80- sx = { {
81- color : 'fg.muted' ,
82- display : 'inline-block' ,
83- } }
84- >
85- { t ( 'category' ) } :
86- </ Box > { ' ' }
80+ < span className = { styles . categoryLabel } > { t ( 'category' ) } :</ span > { ' ' }
8781 { categories [ selectedCategory ] }
8882 </ ActionMenu . Button >
8983 < ActionMenu . Overlay width = "auto" >
@@ -103,14 +97,7 @@ export const CookBookFilter = ({
10397
10498 < ActionMenu >
10599 < ActionMenu . Button className = "col-md-1 col-sm-2 m-1" >
106- < Box
107- sx = { {
108- color : 'fg.muted' ,
109- display : 'inline-block' ,
110- } }
111- >
112- { t ( 'complexity' ) } :
113- </ Box > { ' ' }
100+ < span className = { styles . complexityLabel } > { t ( 'complexity' ) } :</ span > { ' ' }
114101 { complexities [ selectedComplexity ] }
115102 </ ActionMenu . Button >
116103 < ActionMenu . Overlay width = "auto" >
0 commit comments