Skip to content

Commit

Permalink
feat: support read only
Browse files Browse the repository at this point in the history
  • Loading branch information
江宜陞 committed Jun 14, 2024
1 parent 12a4900 commit 000506e
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.35",
"version": "1.0.36",
"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;
readOnly?: boolean;
isPrinterView?: boolean;
parentGroups?: {id: string; groupType: string}[];
};
Expand Down Expand Up @@ -630,6 +631,7 @@ class Renderer extends React.Component<Props, State> {
},
trackInteraction: interactionTracker.track,
isLastUsedWidget: id === this.state.lastUsedWidgetId,
readOnly: this.props.readOnly,
isPrinterView: this.props.isPrinterView,
...(this.props.parentGroups
? {parentGroups: this.props.parentGroups}
Expand Down

0 comments on commit 000506e

Please sign in to comment.