free table infrastructure

This commit is contained in:
Jan Prochazka
2020-10-25 09:31:00 +01:00
parent 857f3fb4f7
commit c80510c37b
14 changed files with 211 additions and 7 deletions

View File

@@ -0,0 +1,15 @@
import _ from 'lodash';
import { useSetOpenedTabs, useCurrentDatabase } from '../utility/globalState';
import { openNewTab } from '../utility/common';
export default function useNewFreeTable() {
const setOpenedTabs = useSetOpenedTabs();
return ({ title = undefined, ...props } = {}) =>
openNewTab(setOpenedTabs, {
title: title || 'Table',
icon: 'freetable.svg',
tabComponent: 'FreeTableTab',
props: {},
});
}