feat: customize edge arrow #918 (#1338)

### What problem does this PR solve?

feat: customize edge arrow #918 

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-07-02 11:43:57 +08:00
committed by GitHub
parent 68b9a857c2
commit 04487d1bce
5 changed files with 86 additions and 109 deletions

View File

@ -28,13 +28,15 @@ const FormMap = {
[Operator.RewriteQuestion]: RewriteQuestionForm,
};
const EmptyContent = () => <div>empty</div>;
const FlowDrawer = ({
visible,
hideModal,
node,
}: IModalProps<any> & IProps) => {
const operatorName: Operator = node?.data.label;
const OperatorForm = FormMap[operatorName];
const OperatorForm = FormMap[operatorName] ?? EmptyContent;
const [form] = Form.useForm();
const { name, handleNameBlur, handleNameChange } =
useHandleNodeNameChange(node);