Skip to content

Pass currentBlock to CustomBlockComponent #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 19, 2021
Merged
Changes from 1 commit
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
Next Next commit
Add block to CustomBlockComponentProps
  • Loading branch information
pyk authored Feb 16, 2021
commit 0ec6df030cb966fd8c5511e978fe4b1673717212
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ export type BlockValueProp<T> = Extract<BlockValueType, { type: T }>;

export interface CustomBlockComponentProps<T extends BlockValueTypeKeys> {
renderComponent: () => JSX.Element | null;
block: BlockType;
blockValue: T extends BlockValueType ? BlockValueProp<T> : BaseValueType;
level: number;
}
Expand Down