36 lines
590 B
TypeScript
36 lines
590 B
TypeScript
import { Meta, StoryObj } from "@storybook/react";
|
|
import { Article } from "./Article";
|
|
|
|
const meta: Meta<typeof Article> = {
|
|
title: "Article/Article",
|
|
component: Article,
|
|
};
|
|
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof Article>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
source: "This is **markdown** content.",
|
|
},
|
|
};
|
|
|
|
export const WithExercise: Story = {
|
|
args: {
|
|
source: `
|
|
## What is addition?
|
|
|
|
1 + 1 = 2 lmao
|
|
|
|
ok now do an exercise:
|
|
|
|
<script type="eduproj/exercise">
|
|
title: Simple Addition
|
|
contributes_to:
|
|
- io.mzhang.eduproj/addition
|
|
|
|
</script>
|
|
`,
|
|
},
|
|
};
|