Skip to content

Commit

Permalink
feat: yarn 4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Jun 19, 2024
1 parent 40f923f commit abbad63
Show file tree
Hide file tree
Showing 10 changed files with 958 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ node_modules
/public/_graphql/
yarn.lock
/app/client/dist/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
16 changes: 8 additions & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { StorybookConfig } from "@storybook/react-vite";
const path = require("path");

const config: StorybookConfig = {
framework: "@storybook/react-vite",
stories: ["../app/client/components/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-essentials", "@storybook/addon-links"],
docs: {
autodocs: "tag",
},
staticDirs: ["../app/client/img"],
framework: "@storybook/react-vite",
stories: ["../app/client/src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-essentials", "@storybook/addon-links"],
staticDirs: ["../app/client/img"],
typescript: {
reactDocgen: "react-docgen-typescript",
},
};

export default config;
9 changes: 9 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Preview } from '@storybook/react';

import '../app/client/src/index.scss';

const preview: Preview = {
parameters: {},
};

export default preview;
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.0.cjs
20 changes: 20 additions & 0 deletions app/client/src/components/Banner/Banner.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from "react";
import type { Meta } from "@storybook/react";
import Banner from "./Banner";

const meta: Meta<typeof Banner> = {
component: Banner,
title: "Elements / Banner",
};

export const Primary = {
render: () => {
return (
<>
<Banner title="Example banner title" />
</>
);
},
};

export default meta;
6 changes: 4 additions & 2 deletions app/client/src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import "@/styles/components/banner.scss";

import React from "react";

export type BannerProps = {
title: string;
description: string;
description?: string;
};

const Banner: React.FC<BannerProps> = ({ title, description }) => {
return (
<div className="banner">
<div className="banner__content">
<h1 className="banner__title">{title}</h1>
<p className="banner__description">{description}</p>
{description && <p className="banner__description">{description}</p>}
</div>
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions app/client/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ body {
padding: 0;
transition: 0.1s ease;

&.lights--on {
&.lights--on,
&.sb-show-main {
opacity: 1;
}
}
Expand All @@ -41,5 +42,3 @@ body {
margin: 0 auto;
max-width: 54ch;
}

@import "./styles/components/banner.scss";
1 change: 1 addition & 0 deletions app/client/src/styles/components/banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
font-size: 40px;
line-height: 1;
max-width: 54ch;
margin: 0 auto;
text-wrap: balance;
}
}
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"storybook": "storybook dev -p 6006 --disable-telemetry"
},
"devDependencies": {
"@storybook/addon-essentials": "^7.0.23",
"@storybook/addon-interactions": "^7.0.23",
"@storybook/addon-links": "^7.0.23",
"@storybook/blocks": "^7.0.23",
"@storybook/react": "^7.0.23",
"@storybook/react-vite": "^7.0.23",
"@storybook/testing-library": "^0.0.14-next.2",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-interactions": "^8.1.10",
"@storybook/addon-links": "^8.1.10",
"@storybook/blocks": "^8.1.10",
"@storybook/react": "^8.1.10",
"@storybook/react-vite": "^8.1.10",
"@storybook/test": "^8.1.10",
"@vitejs/plugin-react": "^4.0.1",
"chromatic": "^6.19.8",
"core-js": "^3.20.2",
Expand All @@ -35,7 +35,7 @@
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^24.9.0",
"sass": "^1.63.6",
"storybook": "^7.0.23",
"storybook": "^8.1.10",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"vite-tsconfig-paths": "^4.2.0"
Expand All @@ -50,5 +50,6 @@
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"packageManager": "[email protected]"
}

0 comments on commit abbad63

Please sign in to comment.