Skip to content

Commit

Permalink
Merge pull request #21 from junyiacademy/feat/read-only
Browse files Browse the repository at this point in the history
Feat: Support read only
  • Loading branch information
jiaojiaojiaoCpbr authored Jun 18, 2024
2 parents 12a4900 + 000506e commit b92912a
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 b92912a

Please sign in to comment.