16 lines
430 B
JavaScript
16 lines
430 B
JavaScript
import { Form } from "react-bootstrap";
|
|
|
|
const QtySelect = ({onChange, qty }) => {
|
|
return (
|
|
<Form.Select onChange={(e)=>onChange(e.target.value)} className="qty-select">
|
|
{Array.from(Array(qty <= 99 ? qty : 99), (e, i) => {
|
|
return (
|
|
<option value={i+1} key={i+1}>{i+1}</option>
|
|
)
|
|
})}
|
|
</Form.Select>
|
|
);
|
|
|
|
}
|
|
|
|
export default QtySelect; |