-
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.
- Loading branch information
Showing
5 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
.storybook/stories/paragraphs/MediaWithCaption.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,41 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { ComponentProps } from "react"; | ||
import StanfordMediaCaption from '@components/paragraphs/stanford-media-caption/media-caption-paragraph'; | ||
import { getStoryBookImage } from '../storybook-entities'; | ||
|
||
type ComponentStoryProps = ComponentProps<typeof StanfordMediaCaption> & { | ||
// text: Text["processed"] | ||
} | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta: Meta<ComponentStoryProps> = { | ||
title: 'Design/Paragraphs/MediaCaption', | ||
component: StanfordMediaCaption, | ||
tags: ['autodocs'], | ||
argTypes: {} | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<ComponentStoryProps>; | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const Banner: Story = { | ||
render: ({ ...args }) => { | ||
return <StanfordMediaCaption {...args} /> | ||
}, | ||
args: { | ||
paragraph: { | ||
id: "aed8df99-4689-46c9-a1ce-2b75a861c707", | ||
suMediaCaptionCaption: { | ||
processed: "<p>This is a media with a caption.</p>", | ||
value: "<p>This is a media with a caption.</p>" | ||
}, | ||
suMediaCaptionLink: { | ||
url: "/publications", | ||
title: "Link.", | ||
internal: true | ||
}, | ||
suMediaCaptionMedia: getStoryBookImage() | ||
} | ||
} | ||
}; |
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