-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adding Card to API docs (#763)
- Loading branch information
Showing
3 changed files
with
79 additions
and
1 deletion.
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
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,7 @@ | ||
import { Meta } from "@storybook/blocks"; | ||
|
||
import AutoDoc from "../helpers/AutoDoc"; | ||
import * as Stories from "./Card.stories"; | ||
|
||
<Meta title="Components/Card" of={Stories} /> | ||
<AutoDoc importName="Card" stage="stable" /> |
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,71 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { Card } from "@versini/ui-card/src/components"; | ||
|
||
type Story = StoryObj<typeof Card>; | ||
|
||
const meta: Meta<typeof Card> = { | ||
parameters: { | ||
layout: "centered", | ||
docs: { | ||
controls: { exclude: ["spacing"] }, | ||
}, | ||
}, | ||
title: "Components/Card", | ||
|
||
component: Card, | ||
args: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Basic: Story = { | ||
args: { | ||
header: "Dune", | ||
footer: "Frank Herbert", | ||
}, | ||
render: (args) => ( | ||
<div className="min-h-10"> | ||
<div className="flex flex-wrap gap-2"> | ||
<Card {...args}> | ||
<p> | ||
In the year 10191, a spice called melange is the most valuable | ||
substance known in the universe, and its only source is the desert | ||
planet Arrakis. | ||
</p> | ||
|
||
<p className="pt-4"> | ||
Paul Atreides, a brilliant and gifted young man born into a great | ||
destiny beyond his understanding, must travel to the most dangerous | ||
planet in the universe. | ||
</p> | ||
</Card> | ||
</div> | ||
</div> | ||
), | ||
}; | ||
|
||
export const Custom: Story = { | ||
args: { | ||
header: <h2 className="text-red-500">Dune</h2>, | ||
footer: <h4 className="text-xs text-slate-400">Frank Herbert</h4>, | ||
}, | ||
render: (args) => ( | ||
<div className="min-h-10"> | ||
<div className="flex flex-wrap gap-2"> | ||
<Card {...args}> | ||
<p> | ||
In the year 10191, a spice called melange is the most valuable | ||
substance known in the universe, and its only source is the desert | ||
planet Arrakis. | ||
</p> | ||
|
||
<p className="pt-4"> | ||
Paul Atreides, a brilliant and gifted young man born into a great | ||
destiny beyond his understanding, must travel to the most dangerous | ||
planet in the universe. | ||
</p> | ||
</Card> | ||
</div> | ||
</div> | ||
), | ||
}; |