introduced yarn workspace

This commit is contained in:
Jan Prochazka
2020-02-03 19:43:11 +01:00
parent 56e6777044
commit acf6a1ce74
151 changed files with 1515 additions and 8576 deletions

View File

@@ -0,0 +1,42 @@
import React from 'react';
import useFetch from '../utility/useFetch';
import styled from 'styled-components';
import theme from '../theme';
import AceEditor from 'react-ace';
import useDimensions from '../utility/useDimensions';
const Wrapper = styled.div`
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
`;
export default function TableCreateScriptTab({ conid, database, schemaName, pureName }) {
const sql = `SELECT * FROM MOJE`;
const [containerRef, { height, width }] = useDimensions();
/** @type {import('dbgate').TableInfo} */
const tableInfo = useFetch({
url: 'tables/table-info',
params: { conid, database, schemaName, pureName },
});
return (
<Wrapper ref={containerRef}>
<AceEditor
mode="sql"
theme="github"
// onChange={onChange}
name="UNIQUE_ID_OF_DIV"
editorProps={{ $blockScrolling: true }}
value={sql}
readOnly
fontSize="11pt"
width={`${width}px`}
height={`${height}px`}
/>
</Wrapper>
);
}