-
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.
- Loading branch information
1 parent
54d5ba7
commit adbec40
Showing
25 changed files
with
8,437 additions
and
3,143 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,70 @@ | ||
import * as React from "react"; | ||
import Box from "@mui/material/Box"; | ||
import Slider from "@mui/material/Slider"; | ||
import Typography from "@mui/material/Typography"; | ||
|
||
const MAX = 500; | ||
const MIN = 0; | ||
const marks = [ | ||
{ | ||
value: MIN, | ||
label: "", | ||
}, | ||
{ | ||
value: MAX, | ||
label: "", | ||
}, | ||
]; | ||
|
||
export default function CustomMarks({ onChangePrice }) { | ||
const [val, setVal] = React.useState([MIN, MAX]); | ||
|
||
const handleChange = (_, newValue) => { | ||
setVal(newValue); | ||
onChangePrice(newValue); // Passing the new value to parent component | ||
}; | ||
|
||
return ( | ||
<Box sx={{ width: 150 }}> | ||
<Slider | ||
marks={marks} | ||
step={10} | ||
value={val} | ||
valueLabelDisplay="auto" | ||
min={MIN} | ||
max={MAX} | ||
onChange={handleChange} | ||
aria-labelledby="range-slider" | ||
valueLabelFormat={(x) => `${x}$`} | ||
sx={{ | ||
color: "black", // Change the slider color to black | ||
"& .MuiSlider-thumb": { | ||
backgroundColor: "black", // Thumb color | ||
}, | ||
"& .MuiSlider-track": { | ||
backgroundColor: "black", // Track color | ||
}, | ||
"& .MuiSlider-rail": { | ||
backgroundColor: "#ddd", // Rail color (optional, to contrast the track) | ||
}, | ||
}} | ||
/> | ||
<Box sx={{ display: "flex", justifyContent: "space-between" }}> | ||
<Typography | ||
variant="body2" | ||
onClick={() => setVal([MIN, val[1]])} | ||
sx={{ cursor: "pointer" }} | ||
> | ||
{MIN}$ | ||
</Typography> | ||
<Typography | ||
variant="body2" | ||
onClick={() => setVal([val[0], MAX])} | ||
sx={{ cursor: "pointer" }} | ||
> | ||
{MAX}$ | ||
</Typography> | ||
</Box> | ||
</Box> | ||
); | ||
} |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.