slider test component
This commit is contained in:
@@ -4,6 +4,18 @@ import React from "react";
|
||||
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||
const { name, label, required, min, max } = formItem;
|
||||
|
||||
const marks = {
|
||||
[min]: {
|
||||
label: <span style={{ height: 0 }}> </span>,
|
||||
},
|
||||
[max / 2]: {
|
||||
label: <span style={{ height: 0 }}> </span>,
|
||||
},
|
||||
[max]: {
|
||||
label: <span style={{ height: 0 }}> </span>,
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<Form.Item
|
||||
name={name}
|
||||
@@ -15,7 +27,12 @@ export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Slider disabled={readOnly} min={min || 0} max={max || 10} />
|
||||
<Slider
|
||||
disabled={readOnly}
|
||||
min={min || 0}
|
||||
max={max || 10}
|
||||
marks={marks}
|
||||
/>
|
||||
</Form.Item>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user