Skip to content

Commit 4e9fa1a

Browse files
authored
Merge pull request #339 from theMattCode/feature/upgrade-next-and-storybook
Upgrade Next.js and Storybook.js
2 parents 0130697 + f93257d commit 4e9fa1a

File tree

14 files changed

+1449
-1603
lines changed

14 files changed

+1449
-1603
lines changed

.storybook/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ module.exports = {
77
],
88

99
addons: [
10-
"@storybook/addon-links",
11-
"@storybook/addon-essentials",
12-
"@storybook/addon-interactions",
13-
"@chromatic-com/storybook"
10+
"@chromatic-com/storybook",
11+
"@storybook/addon-docs"
1412
],
1513

1614
framework: {

.storybook/preview.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ export const parameters = {
99
},
1010
},
1111
viewport: {
12-
viewports: DEFAULT_VIEWPORTS,
13-
defaultViewport: "medium",
12+
options: DEFAULT_VIEWPORTS
1413
},
1514
chromatic: { viewports: [320, 640, 768, 1024, 1200] },
1615
};
16+
17+
export const initialGlobals = {
18+
viewport: {
19+
value: "medium",
20+
isRotated: false
21+
}
22+
};

components/announcements/Announcements.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AnnouncementsBlock } from "#/components/announcements/AnnouncementsBlock";
2-
import { Meta, StoryObj } from "@storybook/react";
2+
import { Meta, StoryObj } from "@storybook/nextjs";
33
import { Announcements } from "#/components/announcements/Announcements";
44
import { Announcement } from "#/content/announcements";
55

components/elements/Elements.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22

33
const meta: Meta = {
44
title: "Elements",

components/markdown/Markdown.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22
import RichTextComponent from "#/components/markdown/Markdown";
33

44
const meta: Meta = {

components/markdown/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function Markdown({ content }: Props): JSX.Element | null {
4545
),
4646
img: (props) => (
4747
<span className="w-full flex flex-col items-center py-2 gap-1">
48-
<Image alt={props.alt ?? ""} src={props.src ?? ""} width={1280} height={768} unoptimized={true} />
48+
<Image alt={props.alt ?? ""} src={`${props.src}`} width={1280} height={768} unoptimized={true} />
4949
{props.alt && (
5050
<span className="w-full flex flex-row justify-center text-sm text-gray-700">{props.alt}</span>
5151
)}

components/match/SoccerMatch.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22
import { SoccerMatchReport } from "#/components/match/SoccerMatchReport";
33

44
const meta: Meta<typeof SoccerMatchReport> = {

components/sponsor/Sponsor.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22
import { Sponsor } from "#/components/sponsor/Sponsor";
33
import { sponsors } from "#/content/sponsor";
44

components/sponsor/SponsorGrid.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22
import { Sponsor } from "#/components/sponsor/Sponsor";
33
import SponsorGrid from "#/components/sponsor/SponsorGrid";
44

components/web/person/PersonCard.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/nextjs";
22
import { getPersonByTag } from "#/content/people";
33
import { PersonCard } from "#/components/web/person/PersonCard";
44

0 commit comments

Comments
 (0)