Skip to content

Commit

Permalink
feedback updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbreese committed Apr 3, 2024
1 parent f172f41 commit 36ba88e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
27 changes: 11 additions & 16 deletions .storybook/stories/config-pages/LocalFooter.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import type {Meta, StoryObj} from '@storybook/react';

import LocalFooter from "@components/config-pages/local-footer";
import {ComponentProps} from "react";

type ComponentStoryProps = ComponentProps<typeof LocalFooter> & {
numberoflinks: number
numberOfLinks: number
}

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
Expand All @@ -19,7 +18,7 @@ const meta: Meta<ComponentStoryProps> = {
control: {type: "select"}
},
suFooterEnabled: {control: "boolean"},
numberoflinks: {
numberOfLinks: {
control: {
type: 'number',
min: 1,
Expand All @@ -34,22 +33,18 @@ type Story = StoryObj<ComponentStoryProps>;

// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
export const LocalFooterDisplay: Story = {
render: ({numberOfLinks, ...args}) => {
const linkList = []
for (let i=0; i< numberOfLinks; i++) {
linkList.push("<a href='http://localhost'>Primary Link</a>")
}
return <LocalFooter {...args} />
},
args: {
suFooterEnabled: true,
// Action links
numberoflinks: 3,
suLocalFootAction: [
{
title: "Action link 1",
url: "https://localhost",
internal: false
},
{
title: "Action link 2",
url: "https://localhost",
internal: false
}
],
numberOfLinks: 3,
suLocalFootAction: [],
// Office location
suLocalFootAddress: {
additionalName: "Additional Organization Name",
Expand Down
10 changes: 5 additions & 5 deletions .storybook/stories/paragraphs/Gallery.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import GalleryParagraph from '@components/paragraphs/stanford-gallery/gallery-pa
import { getStoryBookGalleryImage } from '../storybook-entities';

type ComponentStoryProps = ComponentProps<typeof GalleryParagraph> & {
numberofimages: number
numberOfImages: number
}

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
Expand All @@ -13,7 +13,7 @@ const meta: Meta<ComponentStoryProps> = {
component: GalleryParagraph,
tags: ['autodocs'],
argTypes: {
numberofimages: {
numberOfImages: {
control: {
type: 'number',
min: 1,
Expand All @@ -28,15 +28,15 @@ 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}) => {
render: ({numberOfImages, paragraph, ...args}) => {
paragraph.suGalleryImages = []
for (let i = 0; i < numberofimages; i++) {
for (let i = 0; i < numberOfImages; i++) {
paragraph.suGalleryImages.push(getStoryBookGalleryImage(undefined, 'Lorem Ipsum'))
}
return <GalleryParagraph paragraph={paragraph} {...args} />
},
args: {
numberofimages: 3,
numberOfImages: 3,
paragraph:{
__typename: 'ParagraphStanfordGallery',
composition: {},
Expand Down

0 comments on commit 36ba88e

Please sign in to comment.