diff --git a/packages/package.json b/packages/package.json index 291920cf0c..974f226364 100644 --- a/packages/package.json +++ b/packages/package.json @@ -1,6 +1,6 @@ { "name": "@junyiacademy/perseus-core", - "version": "1.0.23", + "version": "1.0.26", "main": "./dist/index.js", "types": "./dist/index.d.ts", "license": "MIT", diff --git a/packages/perseus/src/renderer.tsx b/packages/perseus/src/renderer.tsx index 1f573c9cbc..20e1044e8b 100644 --- a/packages/perseus/src/renderer.tsx +++ b/packages/perseus/src/renderer.tsx @@ -172,6 +172,7 @@ type Props = Partial> & { widgets: PerseusRenderer["widgets"]; // Skip adding paragraph class inline?: boolean; + parentGroups?: {id: string; groupType: string}[]; }; type State = { @@ -628,6 +629,9 @@ class Renderer extends React.Component { }, trackInteraction: interactionTracker.track, isLastUsedWidget: id === this.state.lastUsedWidgetId, + ...(this.props.parentGroups + ? {parentGroups: this.props.parentGroups} + : {}), }; };