You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
663 B
28 lines
663 B
/** @jsx jsx */
|
|
import { jsx, css } from '@emotion/core';
|
|
import { Button } from 'antd';
|
|
import { useTranslation } from 'react-i18next';
|
|
import EditorHead from './editor-head';
|
|
import SchemaForm from './schema-form';
|
|
import { useUIState } from '../store/ui';
|
|
|
|
function Layout(): JSX.Element {
|
|
const { t } = useTranslation();
|
|
const uiState = useUIState();
|
|
const { formVisible } = uiState;
|
|
|
|
return (
|
|
<div
|
|
className="json-schema-editor"
|
|
css={css`
|
|
padding: 5px;
|
|
`}
|
|
>
|
|
<Button type="primary">{t('import_json')}</Button>
|
|
<EditorHead />
|
|
{formVisible && <SchemaForm />}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default Layout;
|
|
|