-
Notifications
You must be signed in to change notification settings - Fork 1
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
aymerick
committed
Nov 12, 2024
1 parent
4f27706
commit b6cf6c5
Showing
2 changed files
with
69 additions
and
2 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,41 @@ | ||
/** | ||
* Copyright (c) Paymium. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root of this projects source tree. | ||
*/ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { Card } from '@crossed/ui/src/display/Card'; | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export | ||
const meta: Meta<typeof Card> = { | ||
component: Card, | ||
subcomponents: { | ||
'Card.Description': Card.Description, | ||
'Card.Extra': Card.Extra, | ||
'Card.Title': Card.Title, | ||
}, | ||
tags: ['autodocs'], | ||
parameters: { layout: 'centered' }, | ||
render: (e) => ( | ||
<Card {...e}> | ||
<Card.Title>This is a title</Card.Title> | ||
<Card.Description>This is the Description of your card </Card.Description> | ||
<Card.Extra>This is a litle extra</Card.Extra> | ||
</Card> | ||
), | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof Card>; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args | ||
export const Primary: Story = { | ||
parameters: { | ||
docs: { | ||
source: { language: '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