1- import { useState } from 'react' ;
2- import List from './list' ;
3-
4- const ProductsContent = ( ) => {
5- const [ orderProductsOpen , setOrderProductsOpen ] = useState ( false ) ;
6-
7- return (
8- < section className = "products-content" >
9- < div className = "products-content__intro" >
10- < h2 > Men's Tops < span > (133)</ span > </ h2 >
11- < button type = "button" onClick = { ( ) => setOrderProductsOpen ( ! orderProductsOpen ) } className = "products-filter-btn" > < i className = "icon-filters" > </ i > </ button >
12- < form className = { `products-content__filter ${ orderProductsOpen ? 'products-order-open' : '' } ` } >
13- < div className = "products__filter__select" >
14- < h4 > Show products: </ h4 >
15- < div className = "select-wrapper" >
16- < select >
17- < option > Popular</ option >
18- </ select >
19- </ div >
20- </ div >
21- < div className = "products__filter__select" >
22- < h4 > Sort by: </ h4 >
23- < div className = "select-wrapper" >
24- < select >
25- < option > Popular</ option >
26- </ select >
27- </ div >
28- </ div >
29- </ form >
30- </ div >
31-
32- < List />
33- </ section >
34- ) ;
35- } ;
36-
37- export default ProductsContent
1+ import { useState } from 'react' ;
2+ import List from './list' ;
3+
4+ const ProductsContent = ( ) => {
5+ const [ orderProductsOpen , setOrderProductsOpen ] = useState ( false ) ;
6+
7+ return (
8+ < section className = "products-content" >
9+ < div className = "products-content__intro" >
10+ < h2 > Men's Tops < span > (133)</ span > </ h2 >
11+ < button type = "button" onClick = { ( ) => setOrderProductsOpen ( ! orderProductsOpen ) } className = "products-filter-btn" > < i className = "icon-filters" > </ i > </ button >
12+ < form className = { `products-content__filter ${ orderProductsOpen ? 'products-order-open' : '' } ` } >
13+ < div className = "products__filter__select" >
14+ < h4 > Show products: </ h4 >
15+ < div className = "select-wrapper" >
16+ < select >
17+ < option > Popular</ option >
18+ </ select >
19+ </ div >
20+ </ div >
21+ < div className = "products__filter__select" >
22+ < h4 > Sort by: </ h4 >
23+ < div className = "select-wrapper" >
24+ < select >
25+ < option > Popular</ option >
26+ </ select >
27+ </ div >
28+ </ div >
29+ </ form >
30+ </ div >
31+
32+ < List />
33+ </ section >
34+ ) ;
35+ } ;
36+
37+ export default ProductsContent
3838
0 commit comments