- added new fields;

- corrected route urls;
This commit is contained in:
Vitalii Kiiko
2024-09-16 10:50:59 +02:00
parent 0972c0d753
commit cf149485e0
10 changed files with 266 additions and 37 deletions

View File

@@ -4,7 +4,7 @@ import { ItemTypes } from '../ItemTypes';
import uniqid from '../../../../helpers/uniqid';
const BuilderElementItem = ({ dbId, name, label }) => {
const BuilderElementItem = ({ dbId, name, label, description = '' }) => {
const ref = useRef(null);
const [{ isDragging }, drag] = useDrag(() => ({
@@ -28,7 +28,11 @@ const BuilderElementItem = ({ dbId, name, label }) => {
drag(ref);
return (
<div ref={ref} className="formBuilder__elementItem" style={{ opacity }}>
<div
ref={ref}
title={description}
className="formBuilder__elementItem"
style={{ opacity }}>
{label}
</div>
)

View File

@@ -38,6 +38,7 @@ const FormBuilder = () => {
dbId={item.id}
label={item.label}
name={item.name}
description={item.description}
/>
)
}, []);