Skip to content

Commit

Permalink
Revert ItemRenderer removal (#847)
Browse files Browse the repository at this point in the history
* Revert "Remove ItemRenderer and ProvideKeypad (#833)"

This reverts commit 3cf5ac4.

* changeset
  • Loading branch information
handeyeco authored Dec 5, 2023
1 parent 435b7a2 commit 45350a2
Show file tree
Hide file tree
Showing 14 changed files with 2,265 additions and 186 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-donuts-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": major
---

Add back ItemRenderer temporarily
30 changes: 30 additions & 0 deletions packages/perseus/src/__stories__/item-renderer.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import * as React from "react";

import {ItemRendererWithDebugUI} from "../../../../testing/item-renderer-with-debug-ui";
import {
itemWithInput,
labelImageItem,
codeblockItem,
} from "../__testdata__/item-renderer.testdata";

type StoryArgs = Record<any, any>;

type Story = {
title: string;
};

export default {
title: "Perseus/Renderers/Item Renderer",
} as Story;

export const InputNumberItem = (args: StoryArgs): React.ReactElement => {
return <ItemRendererWithDebugUI item={itemWithInput} />;
};

export const LabelImageItem = (args: StoryArgs): React.ReactElement => {
return <ItemRendererWithDebugUI item={labelImageItem} />;
};

export const CodeblockItem = (args: StoryArgs): React.ReactElement => {
return <ItemRendererWithDebugUI item={codeblockItem} />;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ServerItemRendererWithDebugUI} from "../../../../testing/server-item-ren
import {
itemWithInput,
labelImageItem,
} from "../__testdata__/server-item-renderer.testdata";
} from "../__testdata__/item-renderer.testdata";

type StoryArgs = Record<any, any>;

Expand Down
299 changes: 299 additions & 0 deletions packages/perseus/src/__testdata__/item-renderer.testdata.ts

Large diffs are not rendered by default.

160 changes: 0 additions & 160 deletions packages/perseus/src/__testdata__/server-item-renderer.testdata.ts

This file was deleted.

Loading

0 comments on commit 45350a2

Please sign in to comment.