Skip to content

Commit

Permalink
fix: styled-components peer 디팬던시 이슈 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmfou98 committed Oct 16, 2023
1 parent 4463025 commit e966525
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 70 deletions.
170 changes: 110 additions & 60 deletions .pnp.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/jurumarble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"@emotion/is-prop-valid": "^1.2.1",
"@monorepo/hooks": "workspace:*",
"@monorepo/ui": "workspace:*",
"@react-hookz/web": "^23.1.0",
"@tanstack/react-query": "^4.33.0",
"@tanstack/react-query-devtools": "^4.33.0",
Expand Down
12 changes: 9 additions & 3 deletions apps/jurumarble/src/lib/styles/StyledComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

import StyledComponentsRegistry from "lib/registory";
import { PropsWithChildren } from "react";
import { StyleSheetManager, ThemeProvider } from "styled-components";
import { ThemeProvider } from "styled-components";
import { jurumarbleTheme } from "./theme";
import isPropValid from "@emotion/is-prop-valid";
import { theme } from "@monorepo/ui";

import GlobalStyles from "./globalStyles";

function StyledComponents({ children }: PropsWithChildren) {
const mergedTheme = {
...theme,
...jurumarbleTheme,
};

return (
<StyledComponentsRegistry>
{/*
Expand All @@ -19,7 +25,7 @@ function StyledComponents({ children }: PropsWithChildren) {
return typeof elementToBeRendered === "string" ? isPropValid(propName) : true;
}}
> */}
<ThemeProvider theme={jurumarbleTheme}>
<ThemeProvider theme={mergedTheme}>
<>
<GlobalStyles />
{children}
Expand Down
File renamed without changes.
17 changes: 10 additions & 7 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
"main": "index.ts",
"author": "",
"license": "ISC",
"dependencies": {
"@monorepo/hooks": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@monorepo/hooks": "workspace:*",
"@types/node": "20.5.7",
"@types/react": "18.2.21",
"@types/styled-components": "^5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"styled-components": "^5.3.6",
"typescript": "4.9.3"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^5.3.6"
}
}
File renamed without changes.
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,7 @@ __metadata:
dependencies:
"@emotion/is-prop-valid": ^1.2.1
"@monorepo/hooks": "workspace:*"
"@monorepo/ui": "workspace:*"
"@react-hookz/web": ^23.1.0
"@svgr/cli": ^8.0.1
"@svgr/core": ^8.0.0
Expand Down Expand Up @@ -1658,6 +1659,10 @@ __metadata:
react-is: ^18.2.0
styled-components: ^5.3.6
typescript: 4.9.3
peerDependencies:
react: ^18.2.0
react-dom: ^18.2.0
styled-components: ^5.3.6
languageName: unknown
linkType: soft

Expand Down

0 comments on commit e966525

Please sign in to comment.