Skip to content

Commit a40df02

Browse files
committed
Pass level to custom components
1 parent 1429126 commit a40df02

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.9.1",
2+
"version": "0.9.2",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/block.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ export const Block: React.FC<Block> = props => {
504504
<CustomComponent
505505
renderComponent={renderComponent}
506506
blockValue={blockValue as BlockValueProp<typeof blockValue.type>}
507+
level={level}
507508
>
508509
{children}
509510
</CustomComponent>

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ export type BlockValueProp<T> = Extract<BlockValueType, { type: T }>;
347347
export interface CustomBlockComponentProps<T extends BlockValueTypeKeys> {
348348
renderComponent: () => JSX.Element | null;
349349
blockValue: T extends BlockValueType ? BlockValueProp<T> : BaseValueType;
350+
level: number;
350351
}
351352

352353
export type CustomBlockComponents = {

0 commit comments

Comments
 (0)