23 lines
574 B
JavaScript
23 lines
574 B
JavaScript
import { Form, Slider } from "antd";
|
|
import React from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
export default function JobIntakeFormCheckboxComponent({ formItem, readOnly }) {
|
|
const { name, label, required, min, max } = formItem;
|
|
const { t } = useTranslation();
|
|
return (
|
|
<Form.Item
|
|
name={name}
|
|
label={label}
|
|
rules={[
|
|
{
|
|
required: required,
|
|
message: t("general.validation.required"),
|
|
},
|
|
]}
|
|
>
|
|
<Slider disabled={readOnly} min={min || 0} max={max || 10} />
|
|
</Form.Item>
|
|
);
|
|
}
|