@tamagui/helpers-tamagui
Advanced tools
Comparing version 1.125.6 to 1.125.7
export * from "@tamagui/helpers"; | ||
export * from "./prevent"; | ||
export * from "./useCurrentColor"; | ||
export * from "./useGetThemedIcon"; | ||
//# sourceMappingURL=index.js.map | ||
export * from "./prevent.native.js"; | ||
export * from "./useCurrentColor.native.js"; | ||
export * from "./useGetThemedIcon.native.js"; | ||
//# sourceMappingURL=index.native.js.map |
@@ -1,10 +0,5 @@ | ||
var prevent = function(e) { | ||
return [ | ||
e.preventDefault(), | ||
e.stopPropagation() | ||
]; | ||
var prevent = function (e) { | ||
return [e.preventDefault(), e.stopPropagation()]; | ||
}; | ||
export { | ||
prevent | ||
}; | ||
//# sourceMappingURL=prevent.js.map | ||
export { prevent }; | ||
//# sourceMappingURL=prevent.native.js.map |
import { getVariable, useTheme } from "@tamagui/web"; | ||
var useCurrentColor = function(colorProp) { | ||
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()); | ||
var useCurrentColor = function (colorProp) { | ||
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; | ||
}; | ||
export { | ||
useCurrentColor | ||
}; | ||
//# sourceMappingURL=useCurrentColor.js.map | ||
export { useCurrentColor }; | ||
//# sourceMappingURL=useCurrentColor.native.js.map |
import React from "react"; | ||
import { useCurrentColor } from "./useCurrentColor"; | ||
var useGetThemedIcon = function(props) { | ||
import { useCurrentColor } from "./useCurrentColor.native.js"; | ||
var useGetThemedIcon = function (props) { | ||
var color = useCurrentColor(props.color); | ||
return function(el) { | ||
return el && (/* @__PURE__ */ React.isValidElement(el) ? /* @__PURE__ */ React.cloneElement(el, { | ||
return function (el) { | ||
return el && (/* @__PURE__ */React.isValidElement(el) ? /* @__PURE__ */React.cloneElement(el, { | ||
...props, | ||
@@ -11,8 +11,6 @@ color, | ||
...el.props | ||
}) : /* @__PURE__ */ React.createElement(el, props)); | ||
}) : /* @__PURE__ */React.createElement(el, props)); | ||
}; | ||
}; | ||
export { | ||
useGetThemedIcon | ||
}; | ||
//# sourceMappingURL=useGetThemedIcon.js.map | ||
export { useGetThemedIcon }; | ||
//# sourceMappingURL=useGetThemedIcon.native.js.map |
{ | ||
"name": "@tamagui/helpers-tamagui", | ||
"version": "1.125.6", | ||
"version": "1.125.7", | ||
"source": "src/index.ts", | ||
@@ -35,7 +35,7 @@ "types": "./types/index.d.ts", | ||
"dependencies": { | ||
"@tamagui/helpers": "1.125.6", | ||
"@tamagui/web": "1.125.6" | ||
"@tamagui/helpers": "1.125.7", | ||
"@tamagui/web": "1.125.7" | ||
}, | ||
"devDependencies": { | ||
"@tamagui/build": "1.125.6", | ||
"@tamagui/build": "1.125.7", | ||
"react": "*", | ||
@@ -42,0 +42,0 @@ "vitest": "^3.0.5" |
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
32150
503
+ Added@tamagui/compose-refs@1.125.7(transitive)
+ Added@tamagui/constants@1.125.7(transitive)
+ Added@tamagui/helpers@1.125.7(transitive)
+ Added@tamagui/normalize-css-color@1.125.7(transitive)
+ Added@tamagui/simple-hash@1.125.7(transitive)
+ Added@tamagui/timer@1.125.7(transitive)
+ Added@tamagui/types@1.125.7(transitive)
+ Added@tamagui/use-did-finish-ssr@1.125.7(transitive)
+ Added@tamagui/use-event@1.125.7(transitive)
+ Added@tamagui/use-force-update@1.125.7(transitive)
+ Added@tamagui/web@1.125.7(transitive)
- Removed@tamagui/compose-refs@1.125.6(transitive)
- Removed@tamagui/constants@1.125.6(transitive)
- Removed@tamagui/helpers@1.125.6(transitive)
- Removed@tamagui/normalize-css-color@1.125.6(transitive)
- Removed@tamagui/simple-hash@1.125.6(transitive)
- Removed@tamagui/timer@1.125.6(transitive)
- Removed@tamagui/types@1.125.6(transitive)
- Removed@tamagui/use-did-finish-ssr@1.125.6(transitive)
- Removed@tamagui/use-event@1.125.6(transitive)
- Removed@tamagui/use-force-update@1.125.6(transitive)
- Removed@tamagui/web@1.125.6(transitive)
Updated@tamagui/helpers@1.125.7
Updated@tamagui/web@1.125.7