@tamagui/helpers-tamagui
Advanced tools
Comparing version 1.121.12 to 1.122.0
@@ -23,7 +23,4 @@ var __defProp = Object.defineProperty; | ||
const theme = (0, import_web.useTheme)(); | ||
return (0, import_web.getVariable)( | ||
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions | ||
colorProp || theme[colorProp]?.get("web") || theme.color?.get("web") | ||
); | ||
return colorProp ? (0, import_web.getVariable)(colorProp) : theme[colorProp]?.get() || theme.color?.get(); | ||
}; | ||
//# sourceMappingURL=useCurrentColor.js.map |
@@ -22,6 +22,3 @@ "use strict"; | ||
var import_web = require("@tamagui/web"), useCurrentColor = function(colorProp) { | ||
var _theme_colorProp, _theme_color, theme = (0, import_web.useTheme)(), out = (0, import_web.getVariable)( | ||
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions | ||
colorProp || ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get("web")) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get("web")) | ||
); | ||
var _theme_colorProp, _theme_color, theme = (0, import_web.useTheme)(), out = colorProp ? (0, import_web.getVariable)(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get()); | ||
return out; | ||
@@ -28,0 +25,0 @@ }; |
import { getVariable, useTheme } from "@tamagui/web"; | ||
const useCurrentColor = (colorProp) => { | ||
const theme = useTheme(); | ||
return getVariable( | ||
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions | ||
colorProp || theme[colorProp]?.get("web") || theme.color?.get("web") | ||
); | ||
return colorProp ? getVariable(colorProp) : theme[colorProp]?.get() || theme.color?.get(); | ||
}; | ||
@@ -9,0 +6,0 @@ export { |
import { getVariable, useTheme } from "@tamagui/web"; | ||
var useCurrentColor = function(colorProp) { | ||
var _theme_colorProp, _theme_color, theme = useTheme(), out = getVariable( | ||
// TODO can remove 'web' here, will return DynamicColor for iOS for ListItem icons, which is supported in newer react-native-svg versions | ||
colorProp || ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get("web")) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get("web")) | ||
); | ||
var _theme_colorProp, _theme_color, theme = useTheme(), out = colorProp ? getVariable(colorProp) : ((_theme_colorProp = theme[colorProp]) === null || _theme_colorProp === void 0 ? void 0 : _theme_colorProp.get()) || ((_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.get()); | ||
return out; | ||
@@ -8,0 +5,0 @@ }; |
{ | ||
"name": "@tamagui/helpers-tamagui", | ||
"version": "1.121.12", | ||
"version": "1.122.0", | ||
"source": "src/index.ts", | ||
@@ -35,7 +35,7 @@ "types": "./types/index.d.ts", | ||
"dependencies": { | ||
"@tamagui/helpers": "1.121.12", | ||
"@tamagui/web": "1.121.12" | ||
"@tamagui/helpers": "1.122.0", | ||
"@tamagui/web": "1.122.0" | ||
}, | ||
"devDependencies": { | ||
"@tamagui/build": "1.121.12", | ||
"@tamagui/build": "1.122.0", | ||
"react": "*", | ||
@@ -42,0 +42,0 @@ "vitest": "^2.1.8" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
32117
510
+ Added@tamagui/compose-refs@1.122.0(transitive)
+ Added@tamagui/constants@1.122.0(transitive)
+ Added@tamagui/helpers@1.122.0(transitive)
+ Added@tamagui/normalize-css-color@1.122.0(transitive)
+ Added@tamagui/simple-hash@1.122.0(transitive)
+ Added@tamagui/timer@1.122.0(transitive)
+ Added@tamagui/types@1.122.0(transitive)
+ Added@tamagui/use-did-finish-ssr@1.122.0(transitive)
+ Added@tamagui/use-event@1.122.0(transitive)
+ Added@tamagui/use-force-update@1.122.0(transitive)
+ Added@tamagui/web@1.122.0(transitive)
- Removed@tamagui/compose-refs@1.121.12(transitive)
- Removed@tamagui/constants@1.121.12(transitive)
- Removed@tamagui/helpers@1.121.12(transitive)
- Removed@tamagui/normalize-css-color@1.121.12(transitive)
- Removed@tamagui/simple-hash@1.121.12(transitive)
- Removed@tamagui/timer@1.121.12(transitive)
- Removed@tamagui/types@1.121.12(transitive)
- Removed@tamagui/use-did-finish-ssr@1.121.12(transitive)
- Removed@tamagui/use-event@1.121.12(transitive)
- Removed@tamagui/use-force-update@1.121.12(transitive)
- Removed@tamagui/web@1.121.12(transitive)
Updated@tamagui/helpers@1.122.0
Updated@tamagui/web@1.122.0