-
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.
fixup! fixup! fixup! Feat(web-react): Introduce Card component #1535
- Loading branch information
1 parent
c82da00
commit a9cc091
Showing
12 changed files
with
216 additions
and
140 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
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
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
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
64 changes: 64 additions & 0 deletions
64
packages/web-react/src/components/Card/stories/CardBody.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,64 @@ | ||
import { Markdown } from '@storybook/blocks'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import React from 'react'; | ||
import { Button } from '../../Button'; | ||
import { Container } from '../../Container'; | ||
import Card from '../Card'; | ||
import CardBody from '../CardBody'; | ||
import CardEyebrow from '../CardEyebrow'; | ||
import CardFooter from '../CardFooter'; | ||
import CardMedia from '../CardMedia'; | ||
import CardTitle from '../CardTitle'; | ||
import { MEDIA_IMAGE } from '../demo/constants'; | ||
import ReadMe from '../README.md'; | ||
|
||
const meta: Meta<typeof CardBody> = { | ||
title: 'Components/Card', | ||
component: CardBody, | ||
parameters: { | ||
docs: { | ||
page: () => <Markdown>{ReadMe}</Markdown>, | ||
}, | ||
}, | ||
argTypes: { | ||
children: { | ||
control: 'text', | ||
description: 'Text to display in the CardBody.', | ||
table: { | ||
defaultValue: { summary: 'CardBody Text' }, | ||
}, | ||
}, | ||
}, | ||
args: { | ||
children: 'CardBody Text', | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof CardBody>; | ||
|
||
export const CardBodyComponent: Story = { | ||
name: 'CardBody', | ||
render: (args) => { | ||
const { children } = args; | ||
|
||
return ( | ||
<Container> | ||
<Card> | ||
<CardMedia size="medium"> | ||
<img src={MEDIA_IMAGE} alt="media img" /> | ||
</CardMedia> | ||
<CardBody {...args}> | ||
<CardEyebrow>Card Title</CardEyebrow> | ||
<CardTitle>Card Title</CardTitle> | ||
{children} | ||
</CardBody> | ||
<CardFooter> | ||
<Button color="primary">Primary</Button> | ||
<Button color="secondary">Secondary</Button> | ||
</CardFooter> | ||
</Card> | ||
</Container> | ||
); | ||
}, | ||
}; |
Oops, something went wrong.