Skip to content

Commit

Permalink
Generate new block - card-grid-course
Browse files Browse the repository at this point in the history
  • Loading branch information
fResult committed Oct 15, 2023
1 parent 07115f3 commit b16f5d5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
36 changes: 36 additions & 0 deletions blocks/card-grid-course/src/CardGridCourse.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
import storyDialog from "../../../.storybook/decorators/storyDialog";
import Usage from "../usage.mdx";
import CardGridCourse from "./CardGridCourse";

const meta = {
title: "Card/Grid/Course",
component: CardGridCourse,
parameters: {
layout: "centered",
githubUsername: "", // (optional) Your github username. If provided, your avatar will be displayed in the story toolbar
},
decorators: [storyDialog(Usage)],
} satisfies Meta<typeof CardGridCourse>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Course: Story = {
render: () => (
<div
style={{
width: 340,
padding: 20,
maxWidth: "100%",
resize: "horizontal",
overflow: "auto",
}}
>
<CardGridCourse />
</div>
),
};


8 changes: 8 additions & 0 deletions blocks/card-grid-course/src/CardGridCourse.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from "react";
import Box from "@mui/joy/Box";

export default function CardGridCourse() {
return (
<Box>It's working</Box>
);
}
1 change: 1 addition & 0 deletions blocks/card-grid-course/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as CardGridCourse } from "./CardGridCourse";
14 changes: 14 additions & 0 deletions blocks/card-grid-course/usage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Meta, Source } from "@storybook/blocks";
import raw from "./src/CardGridCourse?raw";

<Meta title="Card/Grid/Course" />

## CLI

```sh
npx joy-treasury@latest clone card-grid-course
```

## CardGridCourse

<Source code={raw} language="tsx" />

0 comments on commit b16f5d5

Please sign in to comment.