Skip to content

Commit 206306f

Browse files
authored
fix: customization types import fix (#350)
1 parent 8d1dafe commit 206306f

File tree

7 files changed

+19
-13
lines changed

7 files changed

+19
-13
lines changed

src/customization/BlockDecoration.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import React, {Fragment, PropsWithChildren, useContext} from 'react';
22

33
import {InnerContext} from '../context/innerContext';
4-
5-
export interface BlockDecorationProps extends PropsWithChildren {
6-
id?: string;
7-
}
8-
export type BlockDecorator = (props: BlockDecorationProps) => React.ReactElement;
4+
import {BlockDecorationProps} from '../models';
95

106
export const BlockDecoration = (props: PropsWithChildren<BlockDecorationProps>) => {
117
const block = <Fragment>{props.children}</Fragment>;

src/editor/Containers/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useMemo} from 'react';
22

3-
import {BlockDecorationProps} from '../../customization/BlockDecoration';
3+
import {BlockDecorationProps} from '../../models';
44
import AddBlock from '../Components/AddBlock/AddBlock';
55
import EditBlock from '../Components/EditBlock/EditBlock';
66
import {useEditorState} from '../store';

src/editor/types/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {PageConstructorProps} from '../../containers/PageConstructor';
2-
import {BlockDecorationProps} from '../../customization/BlockDecoration';
3-
import {PageData} from '../../models';
2+
import {BlockDecorationProps, PageData} from '../../models';
43

54
export type EditorBlockId = number | string;
65

src/editor/utils/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import _ from 'lodash';
22

3-
import {BlockDecorator} from '../../customization/BlockDecoration';
4-
import {CustomConfig} from '../../models';
3+
import {BlockDecorator, CustomConfig} from '../../models';
54

65
export const formatBlockName = (name: string) => _.capitalize(name).replace(/(block|-)/g, ' ');
76

src/models/constructor.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import React, {PropsWithChildren} from 'react';
22

3-
import {BlockDecorationProps} from '../customization/BlockDecoration';
4-
5-
import {Animatable, Block, ConstructorItem, ThemedMediaProps, WithChildren} from './';
3+
import {
4+
Animatable,
5+
Block,
6+
BlockDecorationProps,
7+
ConstructorItem,
8+
ThemedMediaProps,
9+
WithChildren,
10+
} from './';
611

712
export interface PageData {
813
content: PageContent;

src/models/customization.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {PropsWithChildren} from 'react';
2+
3+
export interface BlockDecorationProps extends PropsWithChildren {
4+
id?: string;
5+
}
6+
export type BlockDecorator = (props: BlockDecorationProps) => React.ReactElement;

src/models/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export * from './components';
55
export * from './guards';
66
export * from './react';
77
export * from './navigation';
8+
export * from './customization';

0 commit comments

Comments
 (0)