-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from puria-asr/search-page-handeling
Search page handeling
- Loading branch information
Showing
84 changed files
with
2,392 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* CSS */ | ||
.button-82-pushable { | ||
position: relative; | ||
border: none; | ||
background: transparent; | ||
padding: 0; | ||
cursor: pointer; | ||
outline-offset: 4px; | ||
transition: filter 250ms; | ||
user-select: none; | ||
-webkit-user-select: none; | ||
touch-action: manipulation; | ||
} | ||
|
||
.button-82-shadow { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 12px; | ||
background: hsl(0deg 0% 0% / 0.25); | ||
will-change: transform; | ||
transform: translateY(2px); | ||
transition: | ||
transform | ||
600ms | ||
cubic-bezier(.3, .7, .4, 1); | ||
} | ||
|
||
.button-82-edge { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 12px; | ||
background:linear-gradient(to left, hsl(197deg 85% 5%) 0%, hsl(174deg 96% 28%) 8%, hsl(178deg 85% 16%) 92%, hsl(340deg 60% 33%) 100%); | ||
} | ||
|
||
.button-82-front { | ||
display: block; | ||
position: relative; | ||
padding: 8px 27px; | ||
border-radius: 12px; | ||
font-size: 1.1rem; | ||
color: white; | ||
background: hsl(202deg 98% 47%); | ||
will-change: transform; | ||
transform: translateY(-4px); | ||
transition: | ||
transform | ||
600ms | ||
cubic-bezier(.3, .7, .4, 1); | ||
} | ||
|
||
@media (min-width: 768px) { | ||
.button-82-front { | ||
font-size: 1.25rem; | ||
padding: 5px 41px; | ||
} | ||
} | ||
|
||
.button-82-pushable:hover { | ||
filter: brightness(110%); | ||
-webkit-filter: brightness(110%); | ||
} | ||
|
||
.button-82-pushable:hover .button-82-front { | ||
transform: translateY(-6px); | ||
transition: | ||
transform | ||
250ms | ||
cubic-bezier(.3, .7, .4, 1.5); | ||
} | ||
|
||
.button-82-pushable:active .button-82-front { | ||
transform: translateY(-2px); | ||
transition: transform 34ms; | ||
} | ||
|
||
.button-82-pushable:hover .button-82-shadow { | ||
transform: translateY(4px); | ||
transition: | ||
transform | ||
250ms | ||
cubic-bezier(.3, .7, .4, 1.5); | ||
} | ||
|
||
.button-82-pushable:active .button-82-shadow { | ||
transform: translateY(1px); | ||
transition: transform 34ms; | ||
} | ||
|
||
.button-82-pushable:focus:not(:focus-visible) { | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
import React, { useEffect } from 'react'; | ||
import { useState } from 'react'; | ||
import Form from 'react-bootstrap/Form'; | ||
import { useFetchcategoryQuery, useFetchProductsQuery, useFetchsubcategoryQuery } from '../../store/products/productsApiSlice'; | ||
|
||
const EditFormSelect = ({ pagenum, handelSelectChange, subcategory = null, placeholder, initialValue, | ||
setSubcategory, changeSubcategoryid }) => { | ||
|
||
const { data: catrgory = [] } = useFetchcategoryQuery() | ||
const { data: subcatrgoryData = [] } = useFetchsubcategoryQuery() | ||
const subcategoryDataFilter = subcatrgoryData.filter((sub) => { | ||
return sub.category == changeSubcategoryid | ||
}) | ||
useEffect(() => { | ||
console.log(subcategory); | ||
if (subcategory && changeSubcategoryid) { | ||
if (document.getElementById('filtercategory')) { | ||
setSubcategory(subcategoryDataFilter[0].id) | ||
console.log(subcategoryDataFilter[0].id) | ||
} | ||
} | ||
}, [changeSubcategoryid]); | ||
// if (document.getElementById('filtercategory')) { | ||
// console.log(document.getElementById('filtercategory').value); | ||
// } | ||
return ( | ||
|
||
<form > | ||
<Form.Select value={initialValue} onChange={(e) => handelSelectChange(e.target.value)} style={{ width: '6rem' }} id='filtercategory' size="sm"> | ||
{!initialValue && <option value={'null'}>{placeholder}</option>} | ||
{!subcategory ? catrgory.map((element) => { | ||
return <option value={element.id} id={element.id} key={element.id}>{element.name}</option> | ||
}) : subcategoryDataFilter.map((element) => { | ||
return <option value={element.id} id={element.id} key={element.id}>{element.name}</option> | ||
})} | ||
</Form.Select> | ||
</form > | ||
|
||
); | ||
} | ||
|
||
export default EditFormSelect; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
|
||
const SaveBtnComponent = ({ children, type, onClick }) => { | ||
|
||
return ( | ||
<div type={type} onClick={onClick} style={{ position: 'relative', display: 'flex' }}> | ||
<button className="button-82-pushable" role="button"> | ||
<span className="button-82-shadow"></span> | ||
<span className="button-82-edge"></span> | ||
<span className="button-82-front "> | ||
{children} | ||
</span> | ||
</button> | ||
</div> | ||
); | ||
} | ||
|
||
export default SaveBtnComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
padding: 6px 0; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.