Skip to content

Commit

Permalink
Merge pull request #15 from junyiacademy/feat/printer-ui
Browse files Browse the repository at this point in the history
Feat: Support widget printer mode
  • Loading branch information
jiaojiaojiaoCpbr authored Mar 28, 2024
2 parents 6a46baf + c8562a5 commit af59604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@junyiacademy/perseus-core",
"version": "1.0.30",
"version": "1.0.31",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions packages/perseus/src/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ type Props = Partial<React.ContextType<typeof DependenciesContext>> & {
widgets: PerseusRenderer["widgets"];
// Skip adding paragraph class
inline?: boolean;
isPrinterView?: boolean;
parentGroups?: {id: string; groupType: string}[];
};

Expand Down Expand Up @@ -629,6 +630,7 @@ class Renderer extends React.Component<Props, State> {
},
trackInteraction: interactionTracker.track,
isLastUsedWidget: id === this.state.lastUsedWidgetId,
isPrinterView: this.props.isPrinterView,
...(this.props.parentGroups
? {parentGroups: this.props.parentGroups}
: {}),
Expand Down

0 comments on commit af59604

Please sign in to comment.