Skip to content

Commit a994a51

Browse files
authored
Merge pull request #63 from kleros/chore/tailwind-migration
chore: tailwind-configuration
2 parents c66afa7 + a973d5f commit a994a51

File tree

180 files changed

+19035
-10481
lines changed

Some content is hidden

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

180 files changed

+19035
-10481
lines changed

.babelrc

-3
This file was deleted.

.eslintrc.json

-92
This file was deleted.

.github/workflows/eslint.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: ESLint
22
on:
33
pull_request:
4-
branches: [ main ]
4+
branches: [main]
55
jobs:
66
eslint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Install modules
11-
run: yarn
12-
- name: Run ESLint
13-
run: yarn check-style
9+
- uses: actions/checkout@v2
10+
- name: Enable corepack
11+
run: corepack enable
12+
- name: Install modules
13+
run: yarn
14+
- name: Run ESLint
15+
run: yarn check-style

.github/workflows/tsc.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: TypeCheck
22
on:
33
pull_request:
4-
branches: [ main ]
4+
branches: [main]
55
jobs:
66
TypeScriptCompiler:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Install modules
11-
run: yarn
12-
- name: Run TypeScriptCompiler
13-
run: yarn check-types
9+
- uses: actions/checkout@v2
10+
- name: Enable corepack
11+
run: corepack enable
12+
- name: Install modules
13+
run: yarn
14+
- name: Run TypeScriptCompiler
15+
run: yarn check-types

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66
/.pnp.*
77
node_modules
88

9-
# parcel
10-
.parcel-cache
119
development
1210
build
1311
dist
14-
parcel-bundle-reports
1512

1613
# misc
1714
.eslintcache
@@ -26,3 +23,5 @@ parcel-bundle-reports
2623
npm-debug.log*
2724
yarn-debug.log*
2825
yarn-error.log*
26+
27+
*storybook.log

.lintstagedrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"**/*.{js,jsx,ts,tsx}": ["eslint"]
2+
"**/*.{js,jsx,ts,tsx}": ["eslint --fix"]
33
}

.parcelrc

-6
This file was deleted.

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

.storybook/main.ts

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-essentials",
7+
"@storybook/addon-onboarding",
8+
"@chromatic-com/storybook",
9+
"@storybook/addon-interactions",
10+
],
11+
framework: {
12+
name: "@storybook/react-vite",
13+
options: {},
14+
},
15+
typescript: {
16+
reactDocgen: "react-docgen-typescript",
17+
reactDocgenTypescriptOptions: {
18+
propFilter: (prop) => {
19+
if (prop.parent) {
20+
const fileName = prop.parent.fileName;
21+
// Include props from our own code (not in node_modules)
22+
if (!fileName.includes("node_modules")) {
23+
return true;
24+
}
25+
// Include props from react-aria-components and react-aria
26+
if (
27+
fileName.includes("react-aria-components") ||
28+
fileName.includes("react-aria") ||
29+
fileName.includes("node_modules/@react-types")
30+
) {
31+
return true;
32+
}
33+
// Exclude all other props from node_modules
34+
return false;
35+
}
36+
return true;
37+
},
38+
},
39+
},
40+
};
41+
export default config;

.storybook/preview.tsx

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import React, { useEffect } from "react";
2+
import clsx from "clsx";
3+
4+
import type { Preview } from "@storybook/react";
5+
6+
import "../src/styles/global.css";
7+
8+
export type IPreviewArgs = {
9+
themeUI: "light" | "dark";
10+
backgroundUI: "white" | "light";
11+
};
12+
13+
const preview: Preview = {
14+
decorators: [
15+
(Story, { args }) => {
16+
const { themeUI, backgroundUI } = args;
17+
useEffect(() => {
18+
if (themeUI === "dark") document.documentElement.classList.add("dark");
19+
else document.documentElement.classList.remove("dark");
20+
}, [themeUI]);
21+
return (
22+
<div
23+
className={clsx(
24+
"p-4",
25+
backgroundUI === "white"
26+
? "bg-klerosUIComponentsWhiteBackground"
27+
: "bg-klerosUIComponentsLightBackground",
28+
)}
29+
>
30+
<Story />
31+
</div>
32+
);
33+
},
34+
],
35+
args: {
36+
themeUI: "light",
37+
backgroundUI: "white",
38+
},
39+
argTypes: {
40+
themeUI: {
41+
options: ["light", "dark"],
42+
control: { type: "radio" },
43+
},
44+
backgroundUI: {
45+
options: ["white", "light"],
46+
control: { type: "radio" },
47+
},
48+
},
49+
parameters: {
50+
layout: "centered",
51+
},
52+
};
53+
54+
export default preview;

0 commit comments

Comments
 (0)