forked from shesha-io/shesha-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
23 lines (20 loc) · 803 Bytes
/
index.tsx
File metadata and controls
23 lines (20 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React, { FC } from 'react';
import { Empty } from 'antd';
import { useFormDesigner, useFormDesignerReadOnly, useFormDesignerSelectedComponentId } from '@/providers/formDesigner';
const ComponentPropertiesPanelInner: FC = () => {
const { settingsPanelRef } = useFormDesigner();
const readOnly = useFormDesignerReadOnly();
const selectedComponentId = useFormDesignerSelectedComponentId();
return (
<>
{!selectedComponentId && (
<Empty
image={Empty.PRESENTED_IMAGE_SIMPLE}
description={readOnly ? 'Please select a component to view settings' : 'Please select a component to begin editing'}
/>
)}
<div ref={settingsPanelRef}></div>
</>
);
};
export const ComponentPropertiesPanel = React.memo(ComponentPropertiesPanelInner);