Skip to content

Commit

Permalink
feat: styled-system and styled-components dependency removal
Browse files Browse the repository at this point in the history
  • Loading branch information
makkarMeenu committed Oct 22, 2021
1 parent c1a8717 commit 07ff3f1
Show file tree
Hide file tree
Showing 29 changed files with 66 additions and 1,060 deletions.
4 changes: 1 addition & 3 deletions RNBareExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"react-native": "0.64.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-safe-area-context": "^3.2.0",
"react-native-svg": "^12.1.1",
"styled-components": "^5.3.0",
"styled-system": "^5.1.5"
"react-native-svg": "^12.1.1"
},
"devDependencies": {
"@babel/core": "^7.12.9",
Expand Down
210 changes: 6 additions & 204 deletions RNBareExample/yarn.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-safe-area-context": "^3.1.9",
"react-native-svg": "^12.1.0",
"react-native-web": "^0.16.5",
"styled-components": "^5.2.1",
"styled-system": "^5.1.5"
"react-native-web": "^0.16.5"
},
"devDependencies": {
"@babel/core": "~7.9.0",
Expand Down
158 changes: 7 additions & 151 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
jsesc "^2.5.1"
source-map "^0.5.0"

"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.10":
"@babel/helper-annotate-as-pure@^7.10.4", "@babel/helper-annotate-as-pure@^7.12.10":
version "7.12.10"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d"
integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ==
Expand Down Expand Up @@ -1953,7 +1953,7 @@
"@babel/parser" "^7.14.5"
"@babel/types" "^7.14.5"

"@babel/traverse@^7.0.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.4.5", "@babel/traverse@^7.9.0", "@babel/traverse@^7.9.6":
"@babel/traverse@^7.0.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.9.0", "@babel/traverse@^7.9.6":
version "7.12.10"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a"
integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg==
Expand Down Expand Up @@ -2049,7 +2049,7 @@
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413"
integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==

"@emotion/[email protected]", "@emotion/is-prop-valid@^0.8.6", "@emotion/is-prop-valid@^0.8.8":
"@emotion/[email protected]", "@emotion/is-prop-valid@^0.8.6":
version "0.8.8"
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a"
integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==
Expand Down Expand Up @@ -2109,12 +2109,12 @@
"@emotion/styled-base" "^10.0.27"
babel-plugin-emotion "^10.0.27"

"@emotion/[email protected]", "@emotion/stylis@^0.8.4":
"@emotion/[email protected]":
version "0.8.5"
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04"
integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==

"@emotion/[email protected]", "@emotion/unitless@^0.7.4":
"@emotion/[email protected]":
version "0.7.5"
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed"
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==
Expand Down Expand Up @@ -4393,96 +4393,6 @@
resolve-from "^5.0.0"
store2 "^2.12.0"

"@styled-system/background@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/background/-/background-5.1.2.tgz#75c63d06b497ab372b70186c0bf608d62847a2ba"
integrity sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/border@^5.1.5":
version "5.1.5"
resolved "https://registry.yarnpkg.com/@styled-system/border/-/border-5.1.5.tgz#0493d4332d2b59b74bb0d57d08c73eb555761ba6"
integrity sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/color@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/color/-/color-5.1.2.tgz#b8d6b4af481faabe4abca1a60f8daa4ccc2d9f43"
integrity sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/core@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/core/-/core-5.1.2.tgz#b8b7b86455d5a0514f071c4fa8e434b987f6a772"
integrity sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==
dependencies:
object-assign "^4.1.1"

"@styled-system/css@^5.1.5":
version "5.1.5"
resolved "https://registry.yarnpkg.com/@styled-system/css/-/css-5.1.5.tgz#0460d5f3ff962fa649ea128ef58d9584f403bbbc"
integrity sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A==

"@styled-system/flexbox@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/flexbox/-/flexbox-5.1.2.tgz#077090f43f61c3852df63da24e4108087a8beecf"
integrity sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/grid@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/grid/-/grid-5.1.2.tgz#7165049877732900b99cd00759679fbe45c6c573"
integrity sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/layout@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/layout/-/layout-5.1.2.tgz#12d73e79887e10062f4dbbbc2067462eace42339"
integrity sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/position@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/position/-/position-5.1.2.tgz#56961266566836f57a24d8e8e33ce0c1adb59dd3"
integrity sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/shadow@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/shadow/-/shadow-5.1.2.tgz#beddab28d7de03cd0177a87ac4ed3b3b6d9831fd"
integrity sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/space@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/space/-/space-5.1.2.tgz#38925d2fa29a41c0eb20e65b7c3efb6e8efce953"
integrity sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/typography@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@styled-system/typography/-/typography-5.1.2.tgz#65fb791c67d50cd2900d234583eaacdca8c134f7"
integrity sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==
dependencies:
"@styled-system/core" "^5.1.2"

"@styled-system/variant@^5.1.5":
version "5.1.5"
resolved "https://registry.yarnpkg.com/@styled-system/variant/-/variant-5.1.5.tgz#8446d8aad06af3a4c723d717841df2dbe4ddeafd"
integrity sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==
dependencies:
"@styled-system/core" "^5.1.2"
"@styled-system/css" "^5.1.5"

"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
Expand Down Expand Up @@ -5976,16 +5886,6 @@ babel-plugin-require-context-hook@^1.0.0:
resolved "https://registry.yarnpkg.com/babel-plugin-require-context-hook/-/babel-plugin-require-context-hook-1.0.0.tgz#3f0e7cce87c338f53639b948632fd4e73834632d"
integrity sha512-EMZD1563QUqLhzrqcThk759RhuNVX/ZJdrtGK6drwzgvnR+ARjWyXIHPbu+tUNaMGtPz/gQeAM2M6VUw2UiUeA==

"babel-plugin-styled-components@>= 1":
version "1.12.0"
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.12.0.tgz#1dec1676512177de6b827211e9eda5a30db4f9b9"
integrity sha512-FEiD7l5ZABdJPpLssKXjBUJMYqzbcNzBowfXDCdJhOpbhWiewapUaY+LZGT8R4Jg2TwOjGjG4RKeyrO5p9sBkA==
dependencies:
"@babel/helper-annotate-as-pure" "^7.0.0"
"@babel/helper-module-imports" "^7.0.0"
babel-plugin-syntax-jsx "^6.18.0"
lodash "^4.17.11"

babel-plugin-syntax-jsx@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
Expand Down Expand Up @@ -7715,15 +7615,6 @@ css-to-react-native@^2.2.1:
css-color-keywords "^1.0.0"
postcss-value-parser "^3.3.0"

css-to-react-native@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756"
integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==
dependencies:
camelize "^1.0.0"
css-color-keywords "^1.0.0"
postcss-value-parser "^4.0.2"

[email protected]:
version "1.0.0-alpha.37"
resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22"
Expand Down Expand Up @@ -10151,7 +10042,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==

hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0:
hoist-non-react-statics@^3.3.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
Expand Down Expand Up @@ -16923,41 +16814,6 @@ [email protected], style-to-object@^0.3.0:
dependencies:
inline-style-parser "0.1.1"

styled-components@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.2.1.tgz#6ed7fad2dc233825f64c719ffbdedd84ad79101a"
integrity sha512-sBdgLWrCFTKtmZm/9x7jkIabjFNVzCUeKfoQsM6R3saImkUnjx0QYdLwJHBjY9ifEcmjDamJDVfknWm1yxZPxQ==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/traverse" "^7.4.5"
"@emotion/is-prop-valid" "^0.8.8"
"@emotion/stylis" "^0.8.4"
"@emotion/unitless" "^0.7.4"
babel-plugin-styled-components ">= 1"
css-to-react-native "^3.0.0"
hoist-non-react-statics "^3.0.0"
shallowequal "^1.1.0"
supports-color "^5.5.0"

styled-system@^5.1.5:
version "5.1.5"
resolved "https://registry.yarnpkg.com/styled-system/-/styled-system-5.1.5.tgz#e362d73e1dbb5641a2fd749a6eba1263dc85075e"
integrity sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==
dependencies:
"@styled-system/background" "^5.1.2"
"@styled-system/border" "^5.1.5"
"@styled-system/color" "^5.1.2"
"@styled-system/core" "^5.1.2"
"@styled-system/flexbox" "^5.1.2"
"@styled-system/grid" "^5.1.2"
"@styled-system/layout" "^5.1.2"
"@styled-system/position" "^5.1.2"
"@styled-system/shadow" "^5.1.2"
"@styled-system/space" "^5.1.2"
"@styled-system/typography" "^5.1.2"
"@styled-system/variant" "^5.1.5"
object-assign "^4.1.1"

stylehacks@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5"
Expand Down Expand Up @@ -16989,7 +16845,7 @@ supports-color@^2.0.0:
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=

supports-color@^5.3.0, supports-color@^5.5.0:
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
Expand Down
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@
"release-it": "^13.5.8",
"rollup": "^2.34.1",
"rollup-plugin-flow": "^1.1.1",
"styled-components": "^5.2.1",
"styled-system": "^5.1.5",
"typescript": "4.2",
"visualize-bundle": "^1.4.0"
},
Expand All @@ -100,9 +98,7 @@
"react-dom": "*",
"react-native": "*",
"react-native-safe-area-context": "*",
"react-native-svg": "*",
"styled-components": "*",
"styled-system": "*"
"react-native-svg": "*"
},
"jest": {
"preset": "jest-expo",
Expand All @@ -114,7 +110,7 @@
"<rootDir>/lib/"
],
"transformIgnorePatterns": [
"node_modules/(?!(react-native|styled-components|expo-asset|expo-constants|@unimodules|react-native-unimodules|expo-font|react-native-svg|@expo/vector-icons|styled-system|react-native-vector-icons|@react-native-aria/checkbox|@react-native-aria/interactions|@react-native-aria/button|@react-native-aria/switch|@react-native-aria/toggle|@react-native-aria/utils|@react-native-aria/*))"
"node_modules/(?!(react-native|expo-asset|expo-constants|@unimodules|react-native-unimodules|expo-font|react-native-svg|@expo/vector-icons|react-native-vector-icons|@react-native-aria/checkbox|@react-native-aria/interactions|@react-native-aria/button|@react-native-aria/switch|@react-native-aria/toggle|@react-native-aria/utils|@react-native-aria/*))"
],
"setupFiles": [
"<rootDir>/src/jest/mock.ts"
Expand Down Expand Up @@ -200,7 +196,6 @@
"@react-stately/combobox": "^3.0.0-alpha.1",
"@react-stately/radio": "^3.2.1",
"@types/lodash.has": "^4.5.6",
"@types/styled-system": "^5.1.9",
"lodash.clonedeep": "^4.5.0",
"lodash.get": "^4.4.2",
"lodash.has": "^4.5.2",
Expand Down
2 changes: 1 addition & 1 deletion src/components/primitives/Stack/HStack.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { memo, forwardRef } from 'react';
import StackMain, { IStackProps } from './Stack';
import { usePropsResolution } from '../../../hooks/useThemeProps';
import type { ResponsiveValue } from 'styled-system';
import type { ResponsiveValue } from '../../types';
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
export interface IHStackProps extends IStackProps {
/**
Expand Down
7 changes: 1 addition & 6 deletions src/core/NativeBaseContext.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { createContext } from '../utils/createContext';
import { ThemeConsumer, ThemeContext } from 'styled-components/native';
import type { ITheme } from './../theme';
import type { IModeType } from './StrictMode';

export {
ThemeConsumer as NativeBaseConsumer,
ThemeContext as NativeBaseContext,
};

export interface INativebaseConfig {
theme?: ITheme;
suppressColorAccessibilityWarning?: boolean;
Expand All @@ -26,4 +20,5 @@ export const [NativeBaseConfigProvider, useNativeBaseConfig] = createContext<{
config: INativebaseConfig;
currentBreakpoint: number;
isSSR?: boolean;
theme?: ITheme;
}>('NativeBaseConfigProvider');
46 changes: 22 additions & 24 deletions src/core/NativeBaseProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { ThemeProvider } from 'styled-components/native';
import {
SafeAreaProvider,
Metrics,
Expand Down Expand Up @@ -72,31 +71,30 @@ const NativeBaseProvider = (props: NativeBaseProviderProps) => {
);

return (
<ThemeProvider theme={newTheme}>
<NativeBaseConfigProvider
config={config}
currentBreakpoint={currentBreakpoint}
isSSR={isSSR}
<NativeBaseConfigProvider
theme={newTheme}
config={config}
currentBreakpoint={currentBreakpoint}
isSSR={isSSR}
>
<SafeAreaProvider
initialMetrics={
initialWindowMetrics ?? defaultInitialWindowMetricsBasedOnPlatform
}
>
<SafeAreaProvider
initialMetrics={
initialWindowMetrics ?? defaultInitialWindowMetricsBasedOnPlatform
}
<HybridProvider
colorModeManager={colorModeManager}
options={theme.config}
>
<HybridProvider
colorModeManager={colorModeManager}
options={theme.config}
>
<OverlayProvider>
<ToastProvider>
<InitializeToastRef />
<SSRProvider>{children}</SSRProvider>
</ToastProvider>
</OverlayProvider>
</HybridProvider>
</SafeAreaProvider>
</NativeBaseConfigProvider>
</ThemeProvider>
<OverlayProvider>
<ToastProvider>
<InitializeToastRef />
<SSRProvider>{children}</SSRProvider>
</ToastProvider>
</OverlayProvider>
</HybridProvider>
</SafeAreaProvider>
</NativeBaseConfigProvider>
);
};

Expand Down
5 changes: 1 addition & 4 deletions src/factory/component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import type { AnyStyledComponent } from 'styled-components';
import { usePropsWithComponentTheme } from '../hooks/useThemeProps/usePropsWithComponentTheme';
import type { ComponentTheme } from '../theme';
import type { FactoryComponentProps } from './types';
Expand All @@ -11,9 +10,7 @@ export default function Factory<P>(
) {
return React.forwardRef(
({ children, ...props }: P & FactoryComponentProps, ref: any) => {
const StyledComponent = makeStyledComponent(
Component as AnyStyledComponent
);
const StyledComponent = makeStyledComponent(Component);
const calculatedProps = usePropsWithComponentTheme(
componentTheme ?? {},
props
Expand Down
Loading

0 comments on commit 07ff3f1

Please sign in to comment.