diff --git a/src/components/editor_panel.jsx b/src/components/editor_panel.jsx
index dfe987f..09fbe9e 100644
--- a/src/components/editor_panel.jsx
+++ b/src/components/editor_panel.jsx
@@ -105,44 +105,6 @@ export default function EditorPanel(props) {
add area
-
-
-
-
-
-
- ))}
- {t.indices.length > 0 && (
-
+
+
+
+ setIndexActiveKeyTable(i)}
+ >
+ {props.tables.map((t, i) => (
+
+
+
+
+ }
+ itemKey={`${t.id}`}
>
- setIndexActiveKey(itemKey)}
- >
-
- {t.indices.map((idx, k) => (
-
-
- ))}
-
-
-
- )}
-
-
-
- {
- const updatedTables = [...props.tables];
- updatedTables[i] = {
- ...t,
- ...value.values,
- };
- props.setTables(updatedTables);
- }}
+
+
+
+ ))}
+ {t.indices.length > 0 && (
+
- {
+ setIndexActiveKey(itemKey)}
+ >
+
+ {t.indices.map((idx, k) => (
+
+
+ }
+ trigger="click"
+ position="rightTop"
+ showArrow
+ >
+ }
+ type="tertiary"
+ style={{ marginLeft: "12px" }}
+ >
+
+
+ ))}
+
+
+
+ )}
+
+
+
+ {
+ const updatedTables = [...props.tables];
+ updatedTables[i] = {
+ ...t,
+ ...value.values,
+ };
+ props.setTables(updatedTables);
+ }}
+ >
+ {
+ const updatedTables = [...props.tables];
+ updatedTables[i] = {
+ ...t,
+ comment: "",
+ };
+ props.setTables(updatedTables);
+ }}
+ initValue={t.comment}
+ autosize
+ placeholder="Add comment"
+ rows={1}
+ />
+
+
+
+
+
+
+
+
+
Theme
+
updateColor(i, defaultTableTheme)}
+ >
+ Clear
+
+
+
+
+
+ {tableThemes
+ .slice(0, Math.ceil(tableThemes.length / 2))
+ .map((c) => (
+ updateColor(i, c)}
+ >
+ {t.color === c ? (
+
+ ) : (
+
+ )}
+
+ ))}
+
+
+ {tableThemes
+ .slice(Math.ceil(tableThemes.length / 2))
+ .map((c) => (
+ updateColor(i, c)}
+ >
+ {t.color === c ? (
+
+ ) : (
+
+ )}
+
+ ))}
+
+
+
+ }
+ trigger="click"
+ position="bottomLeft"
+ showArrow
+ >
+ }
+ >
+
+
+
+ {
+ setIndexActiveKey("1");
const updatedTables = [...props.tables];
updatedTables[i] = {
...t,
- comment: "",
+ indices: [
+ ...t.indices,
+ { name: `index_${t.indices.length}`, fields: [] },
+ ],
};
props.setTables(updatedTables);
}}
- initValue={t.comment}
- autosize
- placeholder="Add comment"
- rows={1}
- />
-
-
-
-
-
-
-
-
-
Theme
-
updateColor(i, defaultTableTheme)}
- >
- Clear
-
-
-
-
-
- {tableThemes
- .slice(0, Math.ceil(tableThemes.length / 2))
- .map((c) => (
- updateColor(i, c)}
- >
- {t.color === c ? (
-
- ) : (
-
- )}
-
- ))}
-
-
- {tableThemes
- .slice(Math.ceil(tableThemes.length / 2))
- .map((c) => (
- updateColor(i, c)}
- >
- {t.color === c ? (
-
- ) : (
-
- )}
-
- ))}
-
-
-
- }
- trigger="click"
- position="bottomLeft"
- showArrow
- >
- }>
-
-
-
- {
- setIndexActiveKey("1");
- const updatedTables = [...props.tables];
- updatedTables[i] = {
- ...t,
- indices: [
- ...t.indices,
- { name: `index_${t.indices.length}`, fields: [] },
- ],
- };
- props.setTables(updatedTables);
- }}
- >
- Add index
-
-
-
- {
- const updatedTables = [...props.tables];
- updatedTables[i].fields = [
- ...updatedTables[i].fields,
- {
- name: "",
- type: "",
- default: "",
- primary: false,
- unique: false,
- notNull: false,
- increment: false,
- comment: "",
- },
- ];
- props.setTables(updatedTables);
- }}
- block
- >
- Add field
-
-
-
-
- ))}
-
+ >
+ Add index
+
+
+
+ {
+ const updatedTables = [...props.tables];
+ updatedTables[i].fields = [
+ ...updatedTables[i].fields,
+ {
+ name: "",
+ type: "",
+ default: "",
+ primary: false,
+ unique: false,
+ notNull: false,
+ increment: false,
+ comment: "",
+ },
+ ];
+ props.setTables(updatedTables);
+ }}
+ block
+ >
+ Add field
+
+
+
+
+
+ ))}
+
+ >
);
}
diff --git a/src/index.css b/src/index.css
index a3dadd2..44afa54 100644
--- a/src/index.css
+++ b/src/index.css
@@ -6,10 +6,6 @@
outline: none !important;
}
-body {
- overflow: hidden;
-}
-
.bg-blue {
background-color: #124559;
}