Skip to content

Commit

Permalink
Some types improvements/fixes (#6412)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Piercy <[email protected]>
  • Loading branch information
sneridagh and stevepiercy authored Oct 18, 2024
1 parent 5660ae4 commit aeea3ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/types/news/6412.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some improvements and fixes in blocks and settings types. @sneridagh
3 changes: 3 additions & 0 deletions packages/types/src/config/Blocks.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Content } from '../content';
import type { BlockViewProps, BlockEditProps } from '../blocks';
import type { IntlShape } from 'react-intl';
import { User } from '../services';

export interface BlocksConfig {
blocksConfig: BlocksConfigData;
Expand Down Expand Up @@ -79,6 +80,7 @@ export interface BlockConfigBase {
block: BlockConfigBase; // TODO: This has to be extendable
navRoot: Content;
contentType: string;
user: User;
}) => boolean)
| boolean;

Expand Down Expand Up @@ -124,6 +126,7 @@ export interface BlockExtension {
title: string;
template?: React.ComponentType<any>;
render?: React.ComponentType<any>;
view?: React.ComponentType<any>;
fullobjects?: boolean;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/config/Settings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Content } from '../content';
import { BlocksConfigData } from './Blocks';
import { BlocksFormData } from '../blocks/index';

type apiExpandersType =
| { match: string; GET_CONTENT: string[] }
Expand All @@ -19,7 +19,7 @@ type styleClassNameExtendersType = ({
}: {
block: string;
content: Content;
data: BlocksConfigData;
data: BlocksFormData;
classNames: string[];
}) => string[];

Expand Down

0 comments on commit aeea3ed

Please sign in to comment.