Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Fix: global style platform base style #490

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react/src/StyledProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const StyledProvider: React.FC<{

const [animationDriverData, setAnimationDriverData] = React.useState();
const globalStyleMap =
config?.globalStyle && createGlobalStyles(config.globalStyle);
config?.globalStyle && createGlobalStyles(config.globalStyle, Platform);

const contextValue = React.useMemo(() => {
const styledData = {
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/createGlobalStyles.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { convertStyledToStyledVerbosed } from './convertSxToSxVerbosed';
import { stableHash } from './stableHash';
import { resolvePlatformTheme } from './styled';
import { updateOrderUnResolvedMap } from './updateOrderUnResolvedMap';

export const createGlobalStyles = (globalStyle: object) => {
export const createGlobalStyles = (globalStyle: object, Platform) => {
const versboseComponentTheme = convertStyledToStyledVerbosed(globalStyle);
resolvePlatformTheme(versboseComponentTheme, Platform.OS);
const componentHash = stableHash({
...globalStyle,
});
Expand Down
23 changes: 1 addition & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2606,28 +2606,7 @@
"@babel/traverse" "^7.20.5"
lodash.merge "^4.6.2"

"@gluestack-style/babel-plugin-styled-resolver@^0.1.6":
version "0.1.14"
resolved "https://registry.yarnpkg.com/@gluestack-style/babel-plugin-styled-resolver/-/babel-plugin-styled-resolver-0.1.14.tgz#1e3cd2dbdf91b5e9dcb8d34ab7df7aed1beea9bb"
integrity sha512-fgfuvCTngRZIbZf5prtoiZeOBaMtjEh4EJUIJygHY6iXscFuU6tnstnMnHqZdCd1dty+2E1DuwnG+JSKfYgYmA==
dependencies:
"@babel/core" "^7.20.5"
"@babel/generator" "^7.20.5"
"@babel/parser" "^7.20.5"
"@babel/plugin-transform-typescript" "^7.20.2"
"@babel/preset-typescript" "^7.18.6"
"@babel/traverse" "^7.20.5"
lodash.merge "^4.6.2"

"@gluestack-style/react@^0.1.33":
version "0.1.33"
resolved "https://registry.yarnpkg.com/@gluestack-style/react/-/react-0.1.33.tgz#cd18f38bf359527e4f79d223bb07e9024f40ba4f"
integrity sha512-wBdoOA3i/cp0EcgJnwJgL1a8BATjbX/pCZgWm31N6sZOgCB4Phq7m0bDjfSpeJ8sKpOEDlUP5wYCo7Yww0mbqA==
dependencies:
inline-style-prefixer "^6.0.1"
normalize-css-color "^1.0.2"

"@gluestack-style/react@^0.2.11-alpha.0", "@gluestack-style/react@^0.2.16", "@gluestack-style/react@^0.2.21", "@gluestack-style/react@^0.2.49":
"@gluestack-style/react@^0.2.16", "@gluestack-style/react@^0.2.21":
version "0.2.51"
resolved "https://registry.yarnpkg.com/@gluestack-style/react/-/react-0.2.51.tgz#0cfcca4f97f908ed3a352bd7e2336d436cc22415"
integrity sha512-21TLr+e7KneP8N1d1iMKG6npMdYb/oPN/t5KZ/2kns2mg9NVCrfVmVuuMYKo+Xcej95BFOHuGuomskzLwdK1HQ==
Expand Down