-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
2,265 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
30
packages/perseus/src/__stories__/item-renderer.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
299 changes: 299 additions & 0 deletions
299
packages/perseus/src/__testdata__/item-renderer.testdata.ts
Large diffs are not rendered by default.
Oops, something went wrong.
160 changes: 0 additions & 160 deletions
160
packages/perseus/src/__testdata__/server-item-renderer.testdata.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.