Skip to content

Commit c140fb4

Browse files
committed
input range
1 parent 8d7ecae commit c140fb4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: engace.web/src/components/QuestionsQuantity.jsx

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ import PropTypes from "prop-types";
33

44
export default function QuestionsQuantity({ quantity, setQuantity, error }) {
55
return (
6-
<Box sx={{ display: "flex", flexDirection: "column", gap: 1, marginBottom: 3 }}>
6+
<Box
7+
sx={{ display: "flex", flexDirection: "column", gap: 1, marginBottom: 3 }}
8+
>
79
<InputLabel htmlFor="quantity">
8-
<Typography id="modal-modal-title" variant="h6" sx={{ color: "primary.black"}}>
10+
<Typography
11+
id="modal-modal-title"
12+
variant="h6"
13+
sx={{ color: "primary.black" }}
14+
>
915
Số lượng câu hỏi
1016
</Typography>
1117
</InputLabel>
@@ -17,6 +23,10 @@ export default function QuestionsQuantity({ quantity, setQuantity, error }) {
1723
onChange={(e) => setQuantity(e.target.value)}
1824
error={!!error}
1925
helperText={!error ? "Số lượng câu hỏi từ 10 đến 40" : error}
26+
inputProps={{
27+
min: 10,
28+
max: 40,
29+
}}
2030
sx={{
2131
height: "2.5rem",
2232
"& .MuiInputBase-root": {

0 commit comments

Comments
 (0)