-
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
165 changed files
with
4,896 additions
and
4,635 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import {ComponentProps} from "react"; | ||
import {ParagraphStanfordBanner, Text} from "@lib/gql/__generated__/drupal"; | ||
import BannerParagraph from '@components/paragraphs/stanford-banner/banner-paragraph'; | ||
import { getStoryBookImage } from '../storybook-entities'; | ||
import type {Meta, StoryObj} from "@storybook/react" | ||
import {ComponentProps} from "react" | ||
import {ParagraphStanfordBanner, Text} from "@lib/gql/__generated__/drupal" | ||
import BannerParagraph from "@components/paragraphs/stanford-banner/banner-paragraph" | ||
import {getStoryBookImage} from "../storybook-entities" | ||
|
||
type ComponentStoryProps = ComponentProps<typeof BannerParagraph> & { | ||
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/Banner', | ||
title: "Design/Paragraphs/Banner", | ||
component: BannerParagraph, | ||
tags: ['autodocs'], | ||
argTypes: {} | ||
}; | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
} | ||
|
||
export default meta; | ||
type Story = StoryObj<ComponentStoryProps>; | ||
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 <BannerParagraph {...args}/> | ||
return <BannerParagraph {...args} /> | ||
}, | ||
args: { | ||
paragraph:{ | ||
__typename: 'ParagraphStanfordBanner', | ||
paragraph: { | ||
__typename: "ParagraphStanfordBanner", | ||
status: true, | ||
composition: {}, | ||
langcode: {}, | ||
created: { | ||
offset: "", | ||
timestamp: Math.round(new Date().getTime() / 1000), | ||
time: new Date().toISOString(), | ||
timezone: "America/Los_Angeles" | ||
timezone: "America/Los_Angeles", | ||
}, | ||
id: "9954cc81-919b-4498-9151-bf930831fca7", | ||
suBannerHeader: "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", | ||
suBannerBody: { | ||
processed: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.</p>" | ||
processed: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.</p>", | ||
}, | ||
suBannerImage: getStoryBookImage(), | ||
suBannerSupHeader: "Vestibulum" | ||
} | ||
} | ||
}; | ||
suBannerSupHeader: "Vestibulum", | ||
}, | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,52 +1,53 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import {ComponentProps} from "react"; | ||
import {ParagraphStanfordCard, Text} from "@lib/gql/__generated__/drupal"; | ||
import CardParagraph from '@components/paragraphs/stanford-card/card-paragraph'; | ||
import { getStoryBookImage } from '../storybook-entities'; | ||
import type {Meta, StoryObj} from "@storybook/react" | ||
import {ComponentProps} from "react" | ||
import {ParagraphStanfordCard, Text} from "@lib/gql/__generated__/drupal" | ||
import CardParagraph from "@components/paragraphs/stanford-card/card-paragraph" | ||
import {getStoryBookImage} from "../storybook-entities" | ||
|
||
type ComponentStoryProps = ComponentProps<typeof CardParagraph> & { | ||
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/Card', | ||
title: "Design/Paragraphs/Card", | ||
component: CardParagraph, | ||
tags: ['autodocs'], | ||
argTypes: {} | ||
}; | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
} | ||
|
||
export default meta; | ||
type Story = StoryObj<ComponentStoryProps>; | ||
export default meta | ||
type Story = StoryObj<ComponentStoryProps> | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const Card: Story = { | ||
render: ({...args}) => { | ||
return <CardParagraph {...args}/> | ||
return <CardParagraph {...args} /> | ||
}, | ||
args: { | ||
paragraph:{ | ||
__typename: 'ParagraphStanfordCard', | ||
paragraph: { | ||
__typename: "ParagraphStanfordCard", | ||
status: true, | ||
composition: {}, | ||
langcode: {}, | ||
created: { | ||
offset: "", | ||
timestamp: Math.round(new Date().getTime() / 1000), | ||
time: new Date().toISOString(), | ||
timezone: "America/Los_Angeles" | ||
timezone: "America/Los_Angeles", | ||
}, | ||
id: "9954cc81-919b-4498-9151-bf930831fca7", | ||
suCardHeader: "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", | ||
suCardBody: { | ||
processed: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.</p>" | ||
processed: "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.</p>", | ||
}, | ||
suCardLink: { | ||
title: "Button", | ||
url: "/", | ||
internal: true | ||
internal: true, | ||
}, | ||
suCardMedia: getStoryBookImage(), | ||
suCardSuperHeader: "Vestibulum" | ||
} | ||
} | ||
}; | ||
suCardSuperHeader: "Vestibulum", | ||
}, | ||
}, | ||
} |
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 |
---|---|---|
@@ -1,63 +1,69 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import {ComponentProps} from "react"; | ||
import GalleryParagraph from '@components/paragraphs/stanford-gallery/gallery-paragraph'; | ||
import { getStoryBookGalleryImage } from '../storybook-entities'; | ||
import type {Meta, StoryObj} from "@storybook/react" | ||
import {ComponentProps} from "react" | ||
import GalleryParagraph from "@components/paragraphs/stanford-gallery/gallery-paragraph" | ||
import {getStoryBookGalleryImage} from "../storybook-entities" | ||
|
||
type ComponentStoryProps = ComponentProps<typeof GalleryParagraph> & { | ||
numberofimages: number | ||
} | ||
|
||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction | ||
const meta: Meta<ComponentStoryProps> = { | ||
title: 'Design/Paragraphs/Gallery', | ||
title: "Design/Paragraphs/Gallery", | ||
component: GalleryParagraph, | ||
tags: ['autodocs'], | ||
tags: ["autodocs"], | ||
argTypes: { | ||
numberofimages: { | ||
control: { | ||
type: 'number', | ||
type: "number", | ||
min: 1, | ||
max: 20, | ||
} | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
export default meta; | ||
type Story = StoryObj<ComponentStoryProps>; | ||
export default meta | ||
type Story = StoryObj<ComponentStoryProps> | ||
|
||
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args | ||
export const Gallery: Story = { | ||
render: ({numberofimages, paragraph, ...args}) => { | ||
paragraph.suGalleryImages = [] | ||
for (let i = 0; i < numberofimages; i++) { | ||
paragraph.suGalleryImages.push(getStoryBookGalleryImage(undefined, 'Lorem Ipsum')) | ||
paragraph.suGalleryImages.push(getStoryBookGalleryImage(undefined, "Lorem Ipsum")) | ||
} | ||
return <GalleryParagraph paragraph={paragraph} {...args} /> | ||
return ( | ||
<GalleryParagraph | ||
paragraph={paragraph} | ||
{...args} | ||
/> | ||
) | ||
}, | ||
args: { | ||
numberofimages: 3, | ||
paragraph:{ | ||
__typename: 'ParagraphStanfordGallery', | ||
paragraph: { | ||
__typename: "ParagraphStanfordGallery", | ||
status: true, | ||
composition: {}, | ||
langcode: {}, | ||
created: { | ||
offset: "", | ||
timestamp: Math.round(new Date().getTime() / 1000), | ||
time: new Date().toISOString(), | ||
timezone: "America/Los_Angeles" | ||
timezone: "America/Los_Angeles", | ||
}, | ||
id: "1e0c21ee-7cb8-4eff-8877-862d16c9885c", | ||
suGalleryButton: { | ||
url: "http://stanford.edu", | ||
title: "Button text", | ||
internal:false, | ||
internal: false, | ||
}, | ||
suGalleryDescription: { | ||
processed: "<p>Pepper jack fromage frais pecorino cheesecake cheesy grin camembert de normandie macaroni cheese the big cheese.</p>" | ||
processed: "<p>Pepper jack fromage frais pecorino cheesecake cheesy grin camembert de normandie macaroni cheese the big cheese.</p>", | ||
}, | ||
suGalleryHeadline: "This is a Gallery Headline", | ||
suGalleryImages: [] | ||
} | ||
} | ||
}; | ||
suGalleryImages: [], | ||
}, | ||
}, | ||
} |
Oops, something went wrong.