Skip to content

Commit

Permalink
Merge pull request #805 from oBusk/styling/shadcn-ui
Browse files Browse the repository at this point in the history
Use shadcn/ui for styling (Tailwind)
  • Loading branch information
oBusk authored Nov 3, 2023
2 parents 0713a4d + 91235fe commit 0cf911c
Show file tree
Hide file tree
Showing 98 changed files with 3,703 additions and 4,008 deletions.
9 changes: 8 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"root": true,
"extends": [
"next",
"next/core-web-vitals",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:tailwindcss/recommended",
"plugin:prettier/recommended"
],
"plugins": ["jest", "testing-library", "@typescript-eslint/eslint-plugin"],
Expand Down Expand Up @@ -59,5 +61,10 @@
"plugin:testing-library/react"
]
}
]
],
"settings": {
"tailwindcss": {
"callees": ["clsx", "cx", "cva", "twMerge"]
}
}
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["bradlc.vscode-tailwindcss"]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
}
},
"tailwindCSS.experimental.classRegex": [
["(?:cva|cx)\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
3,591 changes: 1,445 additions & 2,146 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,27 @@
"test-ci": "jest --ci"
},
"dependencies": {
"@chakra-ui/icons": "^2.1.1",
"@chakra-ui/next-js": "^2.1.5",
"@chakra-ui/react": "2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"@vercel/analytics": "^1.1.1",
"class-variance-authority": "^0.7.0",
"downshift": "^8.2.2",
"gitdiff-parser": "^0.3.1",
"jest": "^29.7.0",
"libnpmdiff": "^6.0.3",
"lucide-react": "^0.291.0",
"next": "^14.0.1",
"next-themes": "^0.2.1",
"npm-package-arg": "^11.0.1",
"pacote": "^17.0.4",
"react": "^18.2.0",
"react-diff-view": "^3.1.0",
"react-dom": "^18.2.0",
"react-icons": "^4.11.0",
"react-use": "^17.4.0",
"semver": "^7.5.4",
"tailwind-merge": "^2.0.0",
"tailwindcss-animate": "^1.0.7",
"validate-npm-package-name": "^5.0.0"
},
"devDependencies": {
Expand All @@ -71,15 +73,18 @@
"@types/semver": "^7.5.4",
"@types/validate-npm-package-name": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"autoprefixer": "^10.4.16",
"eslint": "^8.52.0",
"eslint-config-next": "^14.0.1",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint-plugin-testing-library": "^6.1.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.0.2",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"simple-git-hooks": "^2.9.0",
"typescript": "5.2.2"
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
30 changes: 15 additions & 15 deletions src/app/[...parts]/_error/ErrorBox.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { Code, forwardRef, VStack } from "@chakra-ui/react";
import BorderBox, { type BorderBoxProps } from "^/components/BorderBox";
import { type ElementRef, forwardRef } from "react";
import BorderBox, { type BorderBoxProps } from "^/components/ui/BorderBox";
import { cx } from "^/lib/cva";

export interface ErrorBoxProps extends BorderBoxProps {}

const ErrorBox = forwardRef<ErrorBoxProps, typeof BorderBox>((props, ref) => {
return (
<BorderBox
as={VStack}
backgroundColor="red.200"
_dark={{
backgroundColor: "red.700",
}}
{...props}
ref={ref}
/>
);
});
const ErrorBox = forwardRef<ElementRef<typeof BorderBox>, ErrorBoxProps>(
({ className, ...props }, ref) => {
return (
<BorderBox
className={cx("bg-red-200 dark:bg-red-700", className)}
{...props}
ref={ref}
/>
);
},
);
ErrorBox.displayName = "ErrorBox";

export default ErrorBox;
Loading

1 comment on commit 0cf911c

@vercel
Copy link

@vercel vercel bot commented on 0cf911c Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.