Skip to content

Commit

Permalink
Apply prettier on all files
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jun 12, 2024
1 parent 1b3fd73 commit 66cbbf6
Show file tree
Hide file tree
Showing 165 changed files with 4,896 additions and 4,635 deletions.
26 changes: 13 additions & 13 deletions .storybook/stories/menu/MainMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from "@storybook/react"

import MainMenu from "@components/menu/main-menu";
import MainMenu from "@components/menu/main-menu"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof MainMenu> = {
title: 'Design/Menu/Main Menu',
title: "Design/Menu/Main Menu",
component: MainMenu,
tags: ['autodocs'],
argTypes: {}
};
tags: ["autodocs"],
argTypes: {},
}

export default meta;
type Story = StoryObj<typeof MainMenu>;
export default meta
type Story = StoryObj<typeof MainMenu>

const defaultMenuProps = {children: [], attributes: {}, expanded: true, internal: true}
const defaultMenuProps = {children: [], attributes: {}, expanded: true, internal: true, langcode: {}}
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const MainMenuComponent: Story = {
args: {
Expand All @@ -35,13 +35,13 @@ export const MainMenuComponent: Story = {
{id: "8", title: "First Item", url: "#", ...defaultMenuProps},
{id: "9", title: "Second Item", url: "#", ...defaultMenuProps},
{id: "10", title: "Third Item", url: "#", ...defaultMenuProps},
]
],
},
{id: "7", title: "Third Item", url: "#", ...defaultMenuProps},
]
],
},
{id: "2", title: "Second Item", url: "#", ...defaultMenuProps},
{id: "3", title: "Third Item", url: "#", ...defaultMenuProps},
]
],
},
};
}
28 changes: 14 additions & 14 deletions .storybook/stories/menu/SideMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import type {Meta, StoryObj} from '@storybook/react';
import type {Meta, StoryObj} from "@storybook/react"

import SideNav from "@components/menu/side-nav";
import SideNav from "@components/menu/side-nav"

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof SideNav> = {
title: 'Design/Menu/Side Nav',
title: "Design/Menu/Side Nav",
component: SideNav,
tags: ['autodocs'],
tags: ["autodocs"],
argTypes: {
menuItems: {
table: {
disable: true,
}
}
}
};
},
},
},
}

export default meta;
type Story = StoryObj<typeof SideNav>;
export default meta
type Story = StoryObj<typeof SideNav>

const defaultMenuProps = {children: [], attributes: {}, expanded: true, internal: true}
const defaultMenuProps = {children: [], attributes: {}, expanded: true, internal: true, langcode: {}}
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const SideNavComponent: Story = {
args: {
Expand All @@ -41,14 +41,14 @@ export const SideNavComponent: Story = {
{id: "8", title: "First Item", url: "/foo/baz/foo", ...defaultMenuProps},
{id: "9", title: "Second Item", url: "/foo/baz/bar", ...defaultMenuProps},
{id: "10", title: "Third Item", url: "/foo/baz/bin", ...defaultMenuProps},
]
],
},
{id: "7", title: "Third Item", url: "/foo/bin", ...defaultMenuProps},
]
],
},
{id: "2", title: "Second Item", url: "/bar", ...defaultMenuProps},
{id: "3", title: "Third Item", url: "/baz", ...defaultMenuProps},
],
activeTrail: ["4", "6", "8"],
},
};
}
41 changes: 21 additions & 20 deletions .storybook/stories/paragraphs/Banner.stories.tsx
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",
},
},
}
43 changes: 22 additions & 21 deletions .storybook/stories/paragraphs/Card.stories.tsx
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",
},
},
}
50 changes: 28 additions & 22 deletions .storybook/stories/paragraphs/Gallery.stories.tsx
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: [],
},
},
}
Loading

0 comments on commit 66cbbf6

Please sign in to comment.