Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/editor-v2/containers/GlobalConfig/GlobalConfig.scss

This file was deleted.

8 changes: 1 addition & 7 deletions src/editor-v2/containers/GlobalConfig/GlobalConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import FormGenerator from '../../../form-generator-v2/FormGenerator';
import {useMainEditorStore} from '../../hooks/useMainEditorStore';
import {editorCn} from '../../utils/cn';

import './GlobalConfig.scss';

const b = editorCn('global-config');

export interface GlobalConfigProps {
className?: string;
Expand All @@ -18,8 +13,7 @@ const GlobalConfig = ({className}: GlobalConfigProps) => {
};

return (
<div className={b(null, className)}>
<div className={b('title')}>Global Config</div>
<div className={className}>
<FormGenerator contentConfig={content} blockConfig={global} onUpdateByKey={onUpdate} />
</div>
);
Expand Down
80 changes: 28 additions & 52 deletions src/editor-v2/hooks/useEditorTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import Tabs, {TabItemProps} from '../components/Tabs/Tabs';
import {TabItemProps} from '../components/Tabs/Tabs';
import BlockConfigForm from '../containers/BlockConfigForm/BlockConfigForm';
import BlocksList from '../containers/BlocksList/BlocksList';
import GlobalConfig from '../containers/GlobalConfig/GlobalConfig';
Expand All @@ -18,68 +18,44 @@ export const useEditorTabs = ({
() => ({
left: [
{
id: 'page',
title: 'PAGE',
component: () => (
<Tabs
items={[
{
id: 'blocks-list',
title: 'BLOCKS',
component: BlocksList,
withPadding: true,
},
{
id: 'layers',
title: 'LAYERS',
component: Tree,
withPadding: true,
},
{
id: 'source-code',
title: 'RAW',
component: ({className}) => (
<SourceCode className={className} />
),
withPadding: true,
},
]}
/>
),
id: 'blocks-list',
title: 'BLOCKS',
component: BlocksList,
withPadding: true,
},
{
id: 'layers',
title: 'LAYERS',
component: Tree,
withPadding: true,
},
{
id: 'global',
title: 'GLOBAL',
component: GlobalConfig,
withPadding: true,
},
{
id: 'source-code',
title: 'RAW',
component: SourceCode,
withPadding: true,
},
...(leftTabs || []),
],
right: [
{
id: 'edit',
title: 'EDIT',
component: () => (
<Tabs
items={[
{
id: 'block-config',
title: 'INPUTS',
component: BlockConfigForm,
},
{
id: 'source-code',
title: 'RAW',
component: ({className}) => (
<SourceCode
className={className}
showSelectedBlockOnly={true}
/>
),
withPadding: true,
},
]}
/>
id: 'block-config',
title: 'INPUTS',
component: BlockConfigForm,
},
{
id: 'source-code',
title: 'RAW',
component: ({className}: {className?: string}) => (
<SourceCode className={className} showSelectedBlockOnly={true} />
),
withPadding: true,
},
...(rightTabs || []),
],
Expand Down
Loading