Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 3bbf198

Browse files
authored
Gatsby 5 🚀 (#113)
* Gatsby 5 upgrade 🚀 * Update changelog 🚀 * Fix image
1 parent efa840b commit 3bbf198

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+16990
-19722
lines changed

.storybook/main.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const webpack = require('webpack');
2+
13
module.exports = {
24
stories: [
35
"../__stories__/**/*.stories.mdx",
@@ -14,7 +16,15 @@ module.exports = {
1416
reactDocgen: false
1517
},
1618
webpackFinal: async config => {
19+
// To load react without having the jsx runtime issues
20+
config.plugins.push(
21+
new webpack.ProvidePlugin({
22+
React: 'react',
23+
})
24+
);
1725
config.module.rules[0].exclude = [/node_modules\/(?!(gatsby)\/)/]
26+
// Remove core-js to prevent issues with Storybook
27+
config.module.rules[0].exclude= [/core-js/]
1828
config.module.rules[0].use[0].loader = require.resolve("babel-loader")
1929
config.module.rules[0].use[0].options.presets = [
2030
require.resolve("@babel/preset-react"),

CHANGELOG.md

Lines changed: 7 additions & 0 deletions

__stories__/atoms/call-to-action-internal.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meta } from "@storybook/react";
22
import React from "react";
33
import { CallToActionInternal } from "../../src/components/design-system/atoms/call-to-action-internal";
44

5-
export const Internal: React.VFC = () => (
5+
export const Internal: React.FC = () => (
66
<CallToActionInternal to={""}>Example</CallToActionInternal>
77
);
88

__stories__/atoms/container-fullscreen.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ContainerWithColor = styled(ContainerFullscreen)`
77
background-color: ${(props) => props.theme.light.primaryColor};
88
`;
99

10-
export const FullScreen: React.VFC = () => (
10+
export const FullScreen: React.FC = () => (
1111
<ContainerWithColor>{"A fluid Container"}</ContainerWithColor>
1212
);
1313

__stories__/atoms/container-section.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ContainerWithColor = styled(ContainerSection)`
77
background-color: ${(props) => props.theme.light.primaryColor};
88
`;
99

10-
export const Section: React.VFC = () => (
10+
export const Section: React.FC = () => (
1111
<ContainerWithColor>{"A fluid Container"}</ContainerWithColor>
1212
);
1313

__stories__/atoms/heading.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Heading5 } from "../../src/components/design-system/atoms/heading5";
88
import { Heading6 } from "../../src/components/design-system/atoms/heading6";
99
import { Heading7 } from "../../src/components/design-system/atoms/heading7";
1010

11-
export const Heading: React.VFC = () => (
11+
export const Heading: React.FC = () => (
1212
<div>
1313
<Heading1>{"Heading 1"}</Heading1>
1414
<Heading2>{"Heading 2"}</Heading2>

__stories__/atoms/links.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Meta } from "@storybook/react";
33
import { StandardInternalLink } from "../../src/components/design-system/atoms/standard-internal-link";
44
import { StandardExternalLink } from "../../src/components/design-system/atoms/standard-external-link";
55

6-
export const Links: React.VFC = () => (
6+
export const Links: React.FC = () => (
77
<>
88
<div>
99
<StandardInternalLink to={""}>An internal link</StandardInternalLink>

__stories__/atoms/overlay.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import React from "react";
21
import { Meta, Story } from "@storybook/react";
32
import {
43
Overlay,
54
OverlayProps,
65
} from "../../src/components/design-system/atoms/overlay";
76
import { Paragraph } from "../../src/components/design-system/atoms/paragraph";
87

8+
const OverlayContainer: React.FC<OverlayProps> = (args) => (
9+
<Overlay {...args} />
10+
);
11+
912
const Template: Story<OverlayProps> = (args) => (
1013
<>
11-
<Overlay {...args} />
14+
<OverlayContainer {...args} />
1215
<Paragraph>
1316
{"An overlay covers 100% of the visible contain with opacity"}
1417
</Paragraph>

__stories__/atoms/syntax.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const StyledExampleCode = styled.div`
124124
${syntax}
125125
`;
126126

127-
export const Code: React.VFC = () => (
127+
export const Code: React.FC = () => (
128128
<>
129129
<StyledExampleCode dangerouslySetInnerHTML={{ __html: htmlSwift }} />
130130
<StyledExampleCode dangerouslySetInnerHTML={{ __html: htmlKotlin }} />

__stories__/atoms/time.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { Meta } from "@storybook/react";
33
import { Time } from "../../src/components/design-system/atoms/time";
44

5-
export const TimeContainer: React.VFC = () => (
5+
export const TimeContainer: React.FC = () => (
66
<>
77
<div>
88
<Time>{"24 Apr 2021"}</Time>

0 commit comments

Comments
 (0)