39 lines
803 B
JavaScript
39 lines
803 B
JavaScript
import { Form, Slider } from "antd";
|
|
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}
|
|
label={label}
|
|
rules={[
|
|
{
|
|
required: required,
|
|
//message: t("general.validation.required"),
|
|
},
|
|
]}
|
|
>
|
|
<Slider
|
|
disabled={readOnly}
|
|
min={min || 0}
|
|
max={max || 10}
|
|
marks={marks}
|
|
/>
|
|
</Form.Item>
|
|
);
|
|
}
|